chore: Update project dependencies.
Some checks failed
Build and Deploy / build-push (push) Has been cancelled

This commit is contained in:
gitmuhammedalbayrak
2025-11-24 02:40:51 +03:00
parent d8d0fa71a8
commit cf05dbe943
23 changed files with 5971 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
import { create } from 'zustand';
interface Project {
id: string;
name: string;
path: string;
parentId: string | null;
children?: Project[];
}
interface ProjectState {
projects: Project[];
expandedKeys: string[];
selectedKey: string | null;
setProjects: (projects: Project[]) => void;
setExpandedKeys: (keys: string[]) => void;
setSelectedKey: (key: string | null) => void;
expandNode: (key: string) => void;
}
export const useProjectStore = create<ProjectState>((set) => ({
projects: [],
expandedKeys: [],
selectedKey: null,
setProjects: (projects) => set({ projects }),
setExpandedKeys: (expandedKeys) => set({ expandedKeys }),
setSelectedKey: (selectedKey) => set({ selectedKey }),
expandNode: (key) =>
set((state) => ({
expandedKeys: state.expandedKeys.includes(key)
? state.expandedKeys
: [...state.expandedKeys, key],
})),
}));