feat: rework multi account

This commit is contained in:
2024-10-24 15:50:45 +07:00
parent 469296790e
commit 055d73c829
31 changed files with 979 additions and 1207 deletions

14
src/routes/_app.tsx Normal file
View File

@@ -0,0 +1,14 @@
import { commands } from '@/commands.gen'
import { createFileRoute, redirect } from '@tanstack/react-router'
export const Route = createFileRoute('/_app')({
beforeLoad: async () => {
const accounts = await commands.getAccounts()
if (!accounts.length) {
throw redirect({ to: '/new', replace: true })
}
return { accounts }
},
})