diff --git a/app/dashboard/chats/[id]/page.tsx b/app/dashboard/chats/[id]/page.tsx index 81931ee..a4f82af 100644 --- a/app/dashboard/chats/[id]/page.tsx +++ b/app/dashboard/chats/[id]/page.tsx @@ -11,9 +11,7 @@ export const metadata: Metadata = { export default function ChatDetailPage({ params }: { params: { id: string } }) { return ( -
- -
+
); } \ No newline at end of file diff --git a/components/dashboard/ChatDetail.tsx b/components/dashboard/ChatDetail.tsx index b326bfa..4dd6ef9 100644 --- a/components/dashboard/ChatDetail.tsx +++ b/components/dashboard/ChatDetail.tsx @@ -10,7 +10,7 @@ import { cn } from "@/lib/utils"; import { formatDistanceToNow } from "date-fns"; import axios from "axios"; import { toast } from "sonner"; -import { ArrowLeft, Send, RefreshCw, FileText, Image as ImageIcon, Download, File } from "lucide-react"; +import { ArrowLeft, Send, RefreshCw, File, FileText, Image as ImageIcon, Download } from "lucide-react"; import { getCookie } from "@/lib/client-utils"; interface Message { @@ -292,55 +292,49 @@ export default function ChatDetail({ chatId }: { chatId: string }) { if (loading) { return ( - - - - - Loading conversation... - - - +
+
+ + Loading conversation... +
+
- - +
+
); } if (!chat) { return ( - - - - - Chat not found - - - +
+
+ + Chat not found +
+

This conversation doesn't exist or you don't have access to it.

- - +
+
); } return ( - - - - - Chat with Customer {chat.buyerId.slice(-4)} - - +
+
+ +

Chat with Customer {chat.buyerId.slice(-4)}

+
- +
{chat.messages.length === 0 ? (

No messages yet. Send one to start the conversation.

@@ -447,9 +441,9 @@ export default function ChatDetail({ chatId }: { chatId: string }) { )) )}
- +
-
+
- +
); } \ No newline at end of file diff --git a/components/layout/layout.tsx b/components/layout/layout.tsx index 5f58f24..4789d08 100644 --- a/components/layout/layout.tsx +++ b/components/layout/layout.tsx @@ -27,12 +27,14 @@ export default function Layout({ children }: LayoutProps) {
-
-
- -
-
-
+ {!isChatDetailPage && ( +
+
+ +
+
+ )} +
{children}