TSK-811: Show last workspace location after switching/opening workspace (#2776)

Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
Vyacheslav Tumanov
2023-03-20 21:07:56 +07:00
committed by GitHub
parent 5d84053685
commit 602b23acd1
5 changed files with 19 additions and 3 deletions
@@ -71,7 +71,10 @@
closePopup()
closePopup()
if (ws !== getCurrentLocation().path[1]) {
navigate({ path: [workbenchId, ws] })
const last = localStorage.getItem(`platform_last_loc_${ws}`)
if (last !== null) {
navigate(JSON.parse(last))
} else navigate({ path: [workbenchId, ws] })
}
}
}