Align DB with create community stage

This commit is contained in:
adilallo
2026-04-15 21:23:48 -06:00
parent 92149d9fb0
commit b15f0d6226
6 changed files with 170 additions and 24 deletions
+10 -4
View File
@@ -77,10 +77,16 @@ export function CreateFlowProvider({
}, []);
const updateState = useCallback((updates: Partial<CreateFlowState>) => {
setState((prevState) => ({
...prevState,
...updates,
}));
setState((prevState) => {
const merged: CreateFlowState = { ...prevState, ...updates };
if (updates.communityStructureChipSnapshots !== undefined) {
merged.communityStructureChipSnapshots = {
...(prevState.communityStructureChipSnapshots ?? {}),
...updates.communityStructureChipSnapshots,
};
}
return merged;
});
}, []);
const replaceState = useCallback((next: CreateFlowState) => {