fixed constructor first page issue

This commit is contained in:
Dmitri 2026-04-21 06:55:08 +04:00
parent 9f63911c78
commit 8e315e5997

View File

@ -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) {