[frontend] use shadcn

This commit is contained in:
2025-10-12 03:29:23 +02:00
parent 1e812c93a6
commit 01b84042ab
45 changed files with 2525 additions and 2137 deletions
+23
View File
@@ -0,0 +1,23 @@
import { create } from "zustand";
import type { Point } from "@/types/api";
type Nullable<T> = T | null;
interface AppState {
userLocation: Nullable<Point>;
locationError: Nullable<string>;
isRequestingLocation: boolean;
setUserLocation: (location: Nullable<Point>) => void;
setLocationError: (error: Nullable<string>) => void;
setIsRequestingLocation: (isRequesting: boolean) => void;
}
export const useAppStore = create<AppState>(set => ({
userLocation: null,
locationError: null,
isRequestingLocation: false,
setUserLocation: userLocation => set({ userLocation }),
setLocationError: locationError => set({ locationError }),
setIsRequestingLocation: isRequestingLocation => set({ isRequestingLocation }),
}));