fix inconsistency

This commit is contained in:
NotII
2025-03-08 05:18:49 +00:00
parent d708098bd9
commit 5fb2575922
2 changed files with 165 additions and 95 deletions

View File

@@ -1,24 +1,36 @@
import React from "react";
import { Metadata } from "next";
"use client";
import { useEffect } from "react";
import { useRouter } from "next/navigation";
import ChatList from "@/components/dashboard/ChatList";
import Dashboard from "@/components/dashboard/dashboard";
export const metadata: Metadata = {
title: "Customer Chats",
description: "Manage conversations with your customers",
};
import { MessageCircle } from "lucide-react";
export default function ChatsPage() {
const router = useRouter();
useEffect(() => {
const authToken = document.cookie
.split("; ")
.find((row) => row.startsWith("Authorization="))
?.split("=")[1];
if (!authToken) {
router.push("/login");
}
}, [router]);
return (
<Dashboard>
<div className="container mx-auto py-6 space-y-6">
<div className="space-y-6">
<div className="flex items-center justify-between">
<h1 className="text-3xl font-bold tracking-tight">Customer Chats</h1>
<h1 className="text-2xl font-semibold text-gray-900 dark:text-white flex items-center">
<MessageCircle className="mr-2 h-6 w-6" />
Customer Chats
</h1>
</div>
<div className="grid grid-cols-1 gap-6">
<ChatList />
</div>
<ChatList />
</div>
</Dashboard>
);