so much stuff???

This commit is contained in:
Maze Winther
2025-06-22 13:07:02 +02:00
parent f2d27e578e
commit be97024868
34 changed files with 2443 additions and 111 deletions

View File

@ -0,0 +1,28 @@
import { TProject } from "@/types/project";
import { create } from "zustand";
interface ProjectStore {
activeProject: TProject | null;
// Actions
createNewProject: (name: string) => void;
closeProject: () => void;
}
export const useProjectStore = create<ProjectStore>((set) => ({
activeProject: null,
createNewProject: (name: string) => {
const newProject: TProject = {
id: crypto.randomUUID(),
name,
createdAt: new Date(),
updatedAt: new Date(),
};
set({ activeProject: newProject });
},
closeProject: () => {
set({ activeProject: null });
},
}));