Implement 'you have unsaved changes' (#850)

This commit is contained in:
Kerem Yilmaz
2024-09-18 11:46:58 -07:00
committed by GitHub
parent 436fcd9620
commit 896c9c8956
4 changed files with 305 additions and 214 deletions

View File

@@ -0,0 +1,13 @@
import { create } from "zustand";
type WorkflowHasChangesStore = {
hasChanges: boolean;
setHasChanges: (hasChanges: boolean) => void;
};
const useWorkflowHasChangesStore = create<WorkflowHasChangesStore>((set) => ({
hasChanges: false,
setHasChanges: (hasChanges) => set({ hasChanges }),
}));
export { useWorkflowHasChangesStore };