Skip to content

Commit

Permalink
Merge pull request #4693 from h3poteto/iss-4653/save-timeline
Browse files Browse the repository at this point in the history
refs #4653 Save the last timeline and go to there when opened
  • Loading branch information
h3poteto authored Dec 5, 2023
2 parents 7a749b9 + 293c680 commit 0e538e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions renderer/pages/accounts/[id]/[timeline].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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': {
Expand Down

0 comments on commit 0e538e9

Please sign in to comment.