mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
fix(home): fix displacement of threads while rendered in popular threads box
This commit is contained in:
@@ -105,12 +105,14 @@ const Home = () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const newSfwListCids = Object.values(subplebbitToCid)
|
const newSfwListCids = Object.values(subplebbitToCid)
|
||||||
.sort((a, b) => b.timestamp - a.timestamp)
|
|
||||||
.map((item) => item.cid)
|
.map((item) => item.cid)
|
||||||
.slice(0, 8);
|
.slice(0, 8);
|
||||||
|
|
||||||
setSfwListCids(newSfwListCids);
|
setSfwListCids((prevOrderedCids) => {
|
||||||
}, [sfwSubs.subplebbits]);
|
const uniqueCids = Array.from(new Set([...prevOrderedCids, ...newSfwListCids]));
|
||||||
|
return uniqueCids.slice(0, 8);
|
||||||
|
});
|
||||||
|
}, [sfwSubs.subplebbits, sfwListCids]);
|
||||||
|
|
||||||
const account = useAccount();
|
const account = useAccount();
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|||||||
Reference in New Issue
Block a user