diff --git a/src/pages/ProjectView.tsx b/src/pages/ProjectView.tsx
index 9c193a78..ac5ce99e 100644
--- a/src/pages/ProjectView.tsx
+++ b/src/pages/ProjectView.tsx
@@ -8,6 +8,7 @@ import { ProjectSidebar } from '@/components/ProjectSidebar';
import { ProjectInfoDialog } from '@/components/ProjectInfoDialog';
import { ResizablePanelGroup, ResizablePanel, ResizableHandle } from '@/components/ui/resizable';
import { Button } from '@/components/ui/button';
+import { Skeleton } from '@/components/ui/skeleton';
import { ArrowLeft, MessageSquare, Eye, Code, Menu, Columns2 } from 'lucide-react';
import { useNavigate } from 'react-router-dom';
import { ActionsMenu } from '@/components/ActionsMenu';
@@ -175,15 +176,7 @@ export function ProjectView() {
navigate('/');
};
- if (isLoading) {
- return (
-
@@ -210,34 +203,47 @@ export function ProjectView() {
-
+ {project ? (
+
+ ) : (
+
+ )}
-
-
+ {project ? (
+ <>
+
+
+ >
+ ) : (
+ <>
+
+
+ >
+ )}
@@ -270,24 +276,40 @@ export function ProjectView() {
{mobileView === 'chat' && (
-
+ project ? (
+
+ ) : (
+
+
+
+
+
+
+ )
)}
{(mobileView === 'preview' || mobileView === 'code') && (
-
+ project ? (
+
+ ) : (
+
+
+
+
+ )
)}
@@ -298,6 +320,7 @@ export function ProjectView() {
size="sm"
onClick={() => setMobileView('chat')}
className="flex-1 rounded-none"
+ disabled={!project}
>
Chat
@@ -307,6 +330,7 @@ export function ProjectView() {
size="sm"
onClick={() => setMobileView('preview')}
className="flex-1 rounded-none"
+ disabled={!project}
>
Preview
@@ -316,10 +340,11 @@ export function ProjectView() {
size="sm"
onClick={() => setMobileView('code')}
className="flex-1 rounded-none"
+ disabled={!project}
>
Code
- {mobileView !== 'code' && (
+ {mobileView !== 'code' && project && (
)}
@@ -327,11 +352,13 @@ export function ProjectView() {
{/* Project Info Dialog */}
-