fixed constructor first page issue
This commit is contained in:
parent
9f63911c78
commit
8e315e5997
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user