diff options
author | Sebastian <sebasjm@gmail.com> | 2024-04-15 09:06:39 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2024-04-15 09:06:39 -0300 |
commit | 56a6c92c814547fcf8af25f183f6ecd75fbbfbb9 (patch) | |
tree | ce5e9a181a33fc95cf0830085b58c7964b7c84a3 /packages/merchant-backoffice-ui/src/paths/notfound/index.tsx | |
parent | 8a146de5a16c04866bbc6df1f570163aed17e42c (diff) | |
download | wallet-core-56a6c92c814547fcf8af25f183f6ecd75fbbfbb9.tar.gz wallet-core-56a6c92c814547fcf8af25f183f6ecd75fbbfbb9.tar.bz2 wallet-core-56a6c92c814547fcf8af25f183f6ecd75fbbfbb9.zip |
fix: clean cache when default instance is created
Diffstat (limited to 'packages/merchant-backoffice-ui/src/paths/notfound/index.tsx')
-rw-r--r-- | packages/merchant-backoffice-ui/src/paths/notfound/index.tsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/merchant-backoffice-ui/src/paths/notfound/index.tsx b/packages/merchant-backoffice-ui/src/paths/notfound/index.tsx index d780b5988..4d348c02b 100644 --- a/packages/merchant-backoffice-ui/src/paths/notfound/index.tsx +++ b/packages/merchant-backoffice-ui/src/paths/notfound/index.tsx @@ -24,6 +24,7 @@ import { Fragment, h, VNode } from "preact"; import { Link, route } from "preact-router"; import { NotificationCard } from "../../components/menu/index.js"; import { + cleanAllCache, DEFAULT_ADMIN_USERNAME, useSessionContext, } from "../../context/session.js"; @@ -57,6 +58,9 @@ export function NotFoundPageOrAdminCreate(): VNode { <InstanceCreatePage forceId={DEFAULT_ADMIN_USERNAME} onConfirm={() => { + // we need to clear everything since we take some + // 404 as "default instance don't exist" + cleanAllCache() route(InstancePaths.bank_list); }} /> |