fix: crash when database is not exist
This commit is contained in:
@@ -68,7 +68,7 @@ function Navigation() {
|
||||
data-tauri-drag-region
|
||||
className="flex h-full flex-1 items-center gap-2"
|
||||
>
|
||||
<Link to="/$account/home" params={{ account }}>
|
||||
<Link to="/$account/home/local" params={{ account }}>
|
||||
{({ isActive }) => (
|
||||
<div
|
||||
className={cn(
|
||||
|
||||
@@ -4,7 +4,7 @@ import { useQueryClient } from "@tanstack/react-query";
|
||||
import { Link } from "@tanstack/react-router";
|
||||
import { Outlet, createFileRoute } from "@tanstack/react-router";
|
||||
|
||||
export const Route = createFileRoute("/$account/home")({
|
||||
export const Route = createFileRoute("/$account/home/local")({
|
||||
component: Screen,
|
||||
});
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ function Create() {
|
||||
try {
|
||||
await ark.save_account(keys);
|
||||
navigate({
|
||||
to: "/$account/home",
|
||||
to: "/$account/home/local",
|
||||
params: { account: keys.npub },
|
||||
search: { onboarding: true },
|
||||
replace: true,
|
||||
|
||||
@@ -32,7 +32,7 @@ function Import() {
|
||||
nsec: key,
|
||||
});
|
||||
navigate({
|
||||
to: "/$account/home",
|
||||
to: "/$account/home/local",
|
||||
params: { account: npub },
|
||||
search: { onboarding: true },
|
||||
replace: true,
|
||||
|
||||
@@ -15,7 +15,7 @@ export const Route = createFileRoute("/")({
|
||||
case 0:
|
||||
const guest = await ark.create_guest_account();
|
||||
throw redirect({
|
||||
to: "/$account/home",
|
||||
to: "/$account/home/local",
|
||||
params: { account: guest },
|
||||
search: { guest: true },
|
||||
replace: true,
|
||||
@@ -26,7 +26,7 @@ export const Route = createFileRoute("/")({
|
||||
const loadAccount = await ark.load_selected_account(account);
|
||||
if (loadAccount) {
|
||||
throw redirect({
|
||||
to: "/$account/home",
|
||||
to: "/$account/home/local",
|
||||
params: { account },
|
||||
replace: true,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user