mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-26 03:05:41 +03:00
Fix dup keys because pinned statuses have same ID too
This commit is contained in:
parent
beca8ed01f
commit
7a5eb39331
1 changed files with 2 additions and 2 deletions
|
@ -298,7 +298,7 @@ function Timeline({
|
|||
<>
|
||||
<ul class="timeline">
|
||||
{items.map((status) => {
|
||||
const { id: statusID, reblog, items, type } = status;
|
||||
const { id: statusID, reblog, items, type, _pinned } = status;
|
||||
const actualStatusID = reblog?.id || statusID;
|
||||
const url = instance
|
||||
? `/${instance}/s/${actualStatusID}`
|
||||
|
@ -349,7 +349,7 @@ function Timeline({
|
|||
);
|
||||
}
|
||||
return (
|
||||
<li key={`timeline-${statusID}`}>
|
||||
<li key={`timeline-${statusID + _pinned}`}>
|
||||
<Link class="status-link timeline-item" to={url}>
|
||||
{useItemID ? (
|
||||
<Status statusID={statusID} instance={instance} />
|
||||
|
|
Loading…
Reference in a new issue