implement frontend skeleton with tab navigation and service layer
- Add tab-based navigation (Chat, Calendar) using Expo-Router - Create auth screens (login, register) as skeletons - Add dynamic routes for event detail and note editing - Implement service layer (ApiClient, AuthService, EventService, ChatService) - Add Zustand stores (AuthStore, EventsStore) for state management - Create EventCard and EventConfirmDialog components - Update CLAUDE.md with new frontend architecture documentation - Add Zustand and FlashList to technology stack
This commit is contained in:
26
apps/client/src/stores/AuthStore.ts
Normal file
26
apps/client/src/stores/AuthStore.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import { create } from 'zustand';
|
||||
import { User } from '@caldav/shared';
|
||||
|
||||
interface AuthState {
|
||||
user: User | null;
|
||||
token: string | null;
|
||||
isAuthenticated: boolean;
|
||||
login: (user: User, token: string) => void;
|
||||
logout: () => void;
|
||||
setToken: (token: string) => void;
|
||||
}
|
||||
|
||||
export const useAuthStore = create<AuthState>((set) => ({
|
||||
user: null,
|
||||
token: null,
|
||||
isAuthenticated: false,
|
||||
login: (_user: User, _token: string) => {
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
logout: () => {
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
setToken: (_token: string) => {
|
||||
throw new Error('Not implemented');
|
||||
},
|
||||
}));
|
||||
Reference in New Issue
Block a user