52 lines
1.8 KiB
TypeScript
52 lines
1.8 KiB
TypeScript
"use client";
|
|
import SiteBreadcrumb from "@/components/site-breadcrumb";
|
|
import BroadcastTable from "./email/component/table";
|
|
import { PlusIcon } from "lucide-react";
|
|
|
|
import EscalationTable from "../../shared/communication/escalation/components/escalation-table";
|
|
import InternalTable from "../../shared/communication/internal/components/internal-table";
|
|
import { useState } from "react";
|
|
import { Link } from "@/i18n/routing";
|
|
import { Button } from "@/components/ui/button";
|
|
import BroadcastEmailTable from "./email/component/table";
|
|
import BroadcastWhatsAppTable from "./whatsapp/component/table";
|
|
|
|
export default function AdminBroadcast() {
|
|
const [tab, setTab] = useState("Email Blast");
|
|
return (
|
|
<div>
|
|
<SiteBreadcrumb />
|
|
<div className="w-full overflow-x-auto bg-white p-4 rounded-sm space-y-3">
|
|
<div className="flex flex-row gap-1 border-2 rounded-md w-fit mb-5">
|
|
<Button
|
|
rounded="md"
|
|
onClick={() => setTab("Email Blast")}
|
|
className={` hover:text-white
|
|
${
|
|
tab === "Email Blast"
|
|
? "bg-black text-white "
|
|
: "bg-white text-black "
|
|
}`}
|
|
>
|
|
Email Blast
|
|
</Button>
|
|
<Button
|
|
rounded="md"
|
|
onClick={() => setTab("WhatsApp Blast")}
|
|
className={` hover:text-white
|
|
${
|
|
tab === "WhatsApp Blast"
|
|
? "bg-black text-white "
|
|
: "bg-white text-black "
|
|
}`}
|
|
>
|
|
WhatsApp Blast
|
|
</Button>
|
|
</div>
|
|
{tab === "Email Blast" && <BroadcastEmailTable />}
|
|
{tab === "WhatsApp Blast" && <BroadcastWhatsAppTable />}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|