mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(p/all): add description view
This commit is contained in:
@@ -78,15 +78,15 @@ const Board = () => {
|
||||
const setLastVirtuosoState = () => {
|
||||
virtuosoRef.current?.getState((snapshot: StateSnapshot) => {
|
||||
if (snapshot?.ranges?.length) {
|
||||
lastVirtuosoStates[subplebbitAddress + sortType] = snapshot;
|
||||
lastVirtuosoStates[location.pathname] = snapshot;
|
||||
}
|
||||
});
|
||||
};
|
||||
window.addEventListener('scroll', setLastVirtuosoState);
|
||||
return () => window.removeEventListener('scroll', setLastVirtuosoState);
|
||||
}, [subplebbitAddress, sortType]);
|
||||
}, [location.pathname]);
|
||||
|
||||
const lastVirtuosoState = lastVirtuosoStates?.[subplebbitAddress + sortType];
|
||||
const lastVirtuosoState = lastVirtuosoStates?.[location.pathname];
|
||||
|
||||
useEffect(() => {
|
||||
document.title = title ? title : shortAddress;
|
||||
|
||||
Reference in New Issue
Block a user