MCPcopy Create free account
hub / github.com/Datakitpage/Datakit / useAuth

Function useAuth

frontend/src/hooks/auth/useAuth.ts:3–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { useAuthStore } from '@/store/authStore';
2
3export const useAuth = () => {
4 const auth = useAuthStore();
5
6 return {
7 // State
8 user: auth.user,
9 isAuthenticated: auth.isAuthenticated,
10 isLoading: auth.isLoading,
11 error: auth.error,
12 settings: auth.settings,
13
14 // Actions
15 login: auth.login,
16 signup: auth.signup,
17 logout: auth.logout,
18 updateProfile: auth.updateProfile,
19 updateSettings: auth.updateSettings,
20
21 // Helpers
22 setError: auth.setError,
23 clearError: auth.clearError,
24 };
25};
26
27export default useAuth;

Callers 15

SettingsSidebarFunction · 0.90
UserMenuFunction · 0.90
AuthModalFunction · 0.90
SubscriptionSettingsFunction · 0.90
RemoteDataImportModalFunction · 0.90
AIAssistantSidebarFunction · 0.90
PostgreSQLPanelFunction · 0.90
ApiKeyModalFunction · 0.90
ModelSelectorFunction · 0.90
InspectorPanelFunction · 0.90
ColumnExportButtonFunction · 0.90
ProblemsViewFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected