From 8e315e5997b258b1d6664ebf7223a3d5413eecd1 Mon Sep 17 00:00:00 2001 From: Dmitri Date: Tue, 21 Apr 2026 06:55:08 +0400 Subject: [PATCH] fixed constructor first page issue --- frontend/src/pages/constructor.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/frontend/src/pages/constructor.tsx b/frontend/src/pages/constructor.tsx index e56b47f..e2adff0 100644 --- a/frontend/src/pages/constructor.tsx +++ b/frontend/src/pages/constructor.tsx @@ -611,6 +611,14 @@ const ConstructorPage = ({ mode = 'constructor' }: ConstructorPageProps) => { prevPagesLengthRef.current = pages.length; }, [pages, pageIdFromRoute, applyPageSelection]); + // Handle empty project case - mark initialized when data loads with no pages + // This allows the "Create First Page" button to show + useEffect(() => { + if (!isDataLoading && pages.length === 0) { + setIsInitializing(false); + } + }, [isDataLoading, pages.length]); + // Handle query errors useEffect(() => { if (isDataError && dataError) {