Skip to content

Commit

Permalink
fix: fix backbutton shown if switched from details view (#5420)
Browse files Browse the repository at this point in the history
Co-authored-by: Nicole O'Brien <nicole.obrien@iota.org>
  • Loading branch information
MarkNerdi996 and nicole-obrien committed Dec 14, 2022
1 parent e0f5b95 commit 4260427
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions packages/desktop/views/dashboard/Sidebar.svelte
Expand Up @@ -10,6 +10,7 @@
collectiblesRouter,
DashboardRoute,
dashboardRouter,
governanceRouter,
settingsRoute,
SettingsRoute,
settingsRouter,
Expand Down Expand Up @@ -75,22 +76,31 @@
]
function openWallet(): void {
$dashboardRouter.reset()
resetAllRouters()
}
function openCollectibles(): void {
resetAllRouters()
$dashboardRouter.goTo(DashboardRoute.Collectibles)
$collectiblesRouter.reset()
}
function openGovernance(): void {
resetAllRouters()
$dashboardRouter.goTo(DashboardRoute.Governance)
}
function openDeveloper(): void {
resetAllRouters()
$dashboardRouter.goTo(DashboardRoute.Developer)
}
function resetAllRouters(): void {
$dashboardRouter.reset()
$collectiblesRouter.reset()
$settingsRouter.reset()
$governanceRouter.reset()
}
function handleBackClick(): void {
if ($settingsRoute === SettingsRoute.Init) {
drawer?.close()
Expand Down

0 comments on commit 4260427

Please sign in to comment.