Merge pull request #4693 from h3poteto/iss-4653/save-timeline

refs #4653 Save the last timeline and go to there when opened
This commit is contained in:
AkiraFukushima 2023-12-06 00:56:10 +09:00 committed by GitHub
commit 0e538e989b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -27,6 +27,12 @@ export default function Page() {
}
}, [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
switch (router.query.timeline as string) {
case 'notifications': {