import Link from "next/link"; import { PlusIcon, SmartphoneIcon, CalendarIcon } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle, } from "@/components/ui/card"; import { AccountStatusBadge } from "@/components/account-status-badge"; import { getSeededOperator } from "@/lib/operator"; import { listAccounts } from "@/lib/queries"; export default async function AccountsPage() { const op = await getSeededOperator(); const accounts = await listAccounts(op.id); return (

Accounts

{accounts.length > 0 ? (
{accounts.map((account) => (
{account.label}
{account.phoneNumber ? (
{account.phoneNumber}
) : (

Not paired yet

)} {account.lastConnectedAt ? (
Last connected{" "} {account.lastConnectedAt.toLocaleDateString("en-MY", { timeZone: "Asia/Kuala_Lumpur", year: "numeric", month: "short", day: "numeric", })}
) : null}
))}
) : (

No accounts paired yet.

Pair a WhatsApp account to start scheduling reminders.

)}
); }