diff --git a/src/components/landing-page/productions-list.tsx b/src/components/landing-page/productions-list.tsx index 3096786f..973c13ce 100644 --- a/src/components/landing-page/productions-list.tsx +++ b/src/components/landing-page/productions-list.tsx @@ -35,6 +35,14 @@ export const ProductionsList = () => { const [productions, setProductions] = useState([]); const [{ reloadProductionList }, dispatch] = useGlobalState(); + useEffect(() => { + if (productions.length < 1) { + dispatch({ + type: "PRODUCTION_CREATED", + }); + } + }, [dispatch, productions]); + // TODO extract to separate hook file useEffect(() => { let aborted = false; diff --git a/src/global-state/global-state-reducer.ts b/src/global-state/global-state-reducer.ts index b397fbd2..533a3d87 100644 --- a/src/global-state/global-state-reducer.ts +++ b/src/global-state/global-state-reducer.ts @@ -6,7 +6,7 @@ import { uniqBy } from "../helpers"; const initialGlobalState: TGlobalState = { production: null, error: null, - reloadProductionList: true, + reloadProductionList: false, devices: null, joinProductionOptions: null, };