Remove a lot of ceremony from frontend state management

This commit is contained in:
Jon Staab
2026-03-26 17:07:44 -07:00
parent a2f9ca9688
commit 6415bcd7b7
15 changed files with 188 additions and 415 deletions
+2 -6
View File
@@ -1,13 +1,10 @@
import { createEffect, createMemo, createSignal, For, Show } from "solid-js"
import { useNavigate } from "@solidjs/router"
import PageContainer from "../components/PageContainer"
import LoadingState from "../components/LoadingState"
import useMinLoading from "../components/useMinLoading"
import { accounts, persistAccounts } from "../lib/nostr"
import { updateActiveTenantBilling, useTenant, useTenantInvoices } from "../lib/hooks"
export default function Account() {
const navigate = useNavigate()
const [tenant, { refetch: refetchTenant }] = useTenant()
const [invoices] = useTenantInvoices()
const [nwcUrl, setNwcUrl] = createSignal("")
@@ -40,9 +37,8 @@ export default function Account() {
}
function logout() {
accounts.clearActive()
persistAccounts()
navigate("/")
localStorage.clear()
window.location.href = "/"
}
return (