18 lines
416 B
TypeScript
18 lines
416 B
TypeScript
|
|
import { create } from "zustand";
|
||
|
|
|
||
|
|
export interface WorkspaceInfo {
|
||
|
|
id: string;
|
||
|
|
slug: string;
|
||
|
|
name: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
interface WorkspaceState {
|
||
|
|
currentWorkspace: WorkspaceInfo | null;
|
||
|
|
setWorkspace: (workspace: WorkspaceInfo | null) => void;
|
||
|
|
}
|
||
|
|
|
||
|
|
export const useWorkspaceStore = create<WorkspaceState>((set) => ({
|
||
|
|
currentWorkspace: null,
|
||
|
|
setWorkspace: (workspace) => set({ currentWorkspace: workspace }),
|
||
|
|
}));
|