Fix wrong status link when it's a boost in Timeline

This commit is contained in:
Lim Chee Aun 2023-01-29 23:34:51 +08:00
parent cc2d4d4cc1
commit 99b9194713

View file

@ -91,13 +91,17 @@ function Timeline({ title, id, emptyText, errorText, fetchItems = () => {} }) {
{!!items.length ? ( {!!items.length ? (
<> <>
<ul class="timeline"> <ul class="timeline">
{items.map((status) => ( {items.map((status) => {
<li key={`timeline-${status.id}`}> const { id: statusID, reblog } = status;
<Link class="status-link" to={`/s/${status.id}`}> const actualStatusID = reblog?.id || statusID;
<Status status={status} /> return (
</Link> <li key={`timeline-${statusID}`}>
</li> <Link class="status-link" to={`/s/${actualStatusID}`}>
))} <Status status={status} />
</Link>
</li>
);
})}
</ul> </ul>
{showMore && ( {showMore && (
<button <button