fix: auto login hooks order bug (#3472)

Fix auto login hooks order bug
This commit is contained in:
Lucas Oliveira 2024-08-21 12:12:17 -03:00 • committed by GitHub
commit a5e366c03d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -8,11 +8,11 @@ const useAutoSaveFlow = () => {
const saveFlow = useSaveFlow(); const saveFlow = useSaveFlow();
const autoSaving = useFlowsManagerStore((state) => state.autoSaving); const autoSaving = useFlowsManagerStore((state) => state.autoSaving);
const autoSaveFlow = autoSaving const autoSaveFlow = useDebounce((flow?: FlowType) => {
? useDebounce((flow?: FlowType) => { if (autoSaving) {
saveFlow(flow); saveFlow(flow);
}, SAVE_DEBOUNCE_TIME) }
: () => {}; }, SAVE_DEBOUNCE_TIME);
return autoSaveFlow; return autoSaveFlow;
}; };