fix: crash when database is not exist

This commit is contained in:
2024-03-08 14:47:36 +07:00
parent a4fdcfdf0b
commit a3e46aa96b
8 changed files with 14 additions and 13 deletions

View File

@@ -45,7 +45,8 @@ function Inactive({ pubkey }: { pubkey: string }) {
const changeAccount = async (npub: string) => {
const select = await ark.load_selected_account(npub);
if (select) navigate({ to: "/$account/home", params: { account: npub } });
if (select)
navigate({ to: "/$account/home/local", params: { account: npub } });
};
return (

View File

@@ -104,7 +104,7 @@ export function BackupDialog() {
</button>
) : (
<Link
to="/$account/home"
to="/$account/home/local"
params={{ account }}
search={{ guest: false }}
className="inline-flex h-11 w-full items-center justify-center gap-1.5 rounded-lg bg-blue-500 px-5 font-medium text-white hover:bg-blue-600"