feat: global login dialog with useRequireAuth hook for 401 auth gating

This commit is contained in:
zetaloop
2026-02-20 18:50:46 +08:00
parent 0403c12ccc
commit 07754069c1
5 changed files with 53 additions and 2 deletions
+13
View File
@@ -0,0 +1,13 @@
import { create } from "zustand"
interface LoginDialogState {
open: boolean
openLoginDialog: () => void
closeLoginDialog: () => void
}
export const useLoginDialogStore = create<LoginDialogState>((set) => ({
open: false,
openLoginDialog: () => set({ open: true }),
closeLoginDialog: () => set({ open: false }),
}))