aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/packages/ui/src/stores/ui-store.ts
diff options
context:
space:
mode:
author苏向夜 <fu050409@163.com>2026-03-29 00:58:15 +0800
committer苏向夜 <fu050409@163.com>2026-03-29 00:58:15 +0800
commit32a4d85af937e4fd882fa671aee8b72878cc564f (patch)
treea79ccbed55848d527ae6ac391607b36923794e9d /packages/ui/src/stores/ui-store.ts
parent97fe5046f68b5e4ee5f750945bcc39a27f5eb37b (diff)
downloadDropOut-32a4d85af937e4fd882fa671aee8b72878cc564f.tar.gz
DropOut-32a4d85af937e4fd882fa671aee8b72878cc564f.zip
feat(ui): remove all stores
Diffstat (limited to 'packages/ui/src/stores/ui-store.ts')
-rw-r--r--packages/ui/src/stores/ui-store.ts42
1 files changed, 0 insertions, 42 deletions
diff --git a/packages/ui/src/stores/ui-store.ts b/packages/ui/src/stores/ui-store.ts
deleted file mode 100644
index 89b9191..0000000
--- a/packages/ui/src/stores/ui-store.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-import { create } from "zustand";
-
-export type ViewType = "home" | "versions" | "settings" | "guide" | "instances";
-
-interface UIState {
- // State
- currentView: ViewType;
- showConsole: boolean;
- appVersion: string;
-
- // Actions
- toggleConsole: () => void;
- setView: (view: ViewType) => void;
- setAppVersion: (version: string) => void;
-}
-
-export const useUIStore = create<UIState>((set) => ({
- // Initial state
- currentView: "home",
- showConsole: false,
- appVersion: "...",
-
- // Actions
- toggleConsole: () => {
- set((state) => ({ showConsole: !state.showConsole }));
- },
-
- setView: (view: ViewType) => {
- set({ currentView: view });
- },
-
- setAppVersion: (version: string) => {
- set({ appVersion: version });
- },
-}));
-
-// Provide lowercase alias for compatibility with existing imports.
-// Use a function wrapper to ensure the named export exists as a callable value
-// at runtime (some bundlers/tree-shakers may remove simple aliases).
-export function useUiStore() {
- return useUIStore();
-}