Some checks failed
Build Frontend / build (push) Failing after 7s
Replaces imports from 'components/ui' with 'components/common' across the app and dashboard pages, and updates model and API imports to use new paths under 'lib'. Removes redundant authentication checks from several dashboard pages. Adds new dashboard components and utility files, and reorganizes hooks and services into the 'lib' directory for improved structure.
40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import React from "react";
|
|
import { Metadata } from "next";
|
|
import dynamic from "next/dynamic";
|
|
import { Skeleton } from "@/components/common/skeleton";
|
|
import Dashboard from "@/components/dashboard/dashboard";
|
|
|
|
export const metadata: Metadata = {
|
|
title: "Chat Conversation",
|
|
description: "View and respond to customer messages",
|
|
};
|
|
|
|
interface PageProps {
|
|
params: Promise<{
|
|
id: string;
|
|
}>;
|
|
}
|
|
|
|
export default async function ChatDetailPage({ params }: PageProps) {
|
|
const { id } = await params;
|
|
const ChatDetail = dynamic(() => import("@/components/dashboard/ChatDetail"), {
|
|
loading: () => (
|
|
<div className="space-y-4">
|
|
<div className="flex items-center justify-between">
|
|
<Skeleton className="h-6 w-48" />
|
|
<div className="flex gap-2">
|
|
<Skeleton className="h-9 w-24" />
|
|
<Skeleton className="h-9 w-24" />
|
|
</div>
|
|
</div>
|
|
<Skeleton className="h-24 w-full" />
|
|
<Skeleton className="h-96 w-full" />
|
|
</div>
|
|
)
|
|
});
|
|
return (
|
|
<Dashboard>
|
|
<ChatDetail chatId={id} />
|
|
</Dashboard>
|
|
);
|
|
}
|