feat: global login dialog with useRequireAuth hook for 401 auth gating
This commit is contained in:
@@ -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 }),
|
||||
}))
|
||||
Reference in New Issue
Block a user