1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2024-12-23 23:47:57 +01:00

refs #4653 Save the last timeline and go to there when opened

This commit is contained in:
AkiraFukushima 2023-12-06 00:53:47 +09:00
parent 7a749b9355
commit 293c680b1c
No known key found for this signature in database
GPG Key ID: B6E51BAC4DE1A957

View File

@ -27,6 +27,12 @@ export default function Page() {
} }
}, [router.query.id]) }, [router.query.id])
useEffect(() => {
if (router.query.timeline && router.query.id && typeof localStorage !== 'undefined') {
localStorage.setItem(`${router.query.id}_lastTimeline`, router.query.timeline as string)
}
}, [router.query.id, router.query.timeline])
if (!account || !client) return null if (!account || !client) return null
switch (router.query.timeline as string) { switch (router.query.timeline as string) {
case 'notifications': { case 'notifications': {