2f88e883b2
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
26 lines
627 B
TypeScript
26 lines
627 B
TypeScript
import { AccountsList } from './AccountsList';
|
|
|
|
interface Account {
|
|
id: string;
|
|
jid: string;
|
|
displayName: string | null;
|
|
status: string;
|
|
platform: string;
|
|
}
|
|
|
|
export default async function AccountsPage() {
|
|
const apiUrl = process.env.API_URL ?? 'http://localhost:3001';
|
|
let accounts: Account[] = [];
|
|
try {
|
|
const res = await fetch(`${apiUrl}/accounts`, { cache: 'no-store' });
|
|
if (res.ok) accounts = await res.json();
|
|
} catch {}
|
|
|
|
return (
|
|
<div className="max-w-2xl">
|
|
<h1 className="text-xl font-semibold mb-6">Accounts</h1>
|
|
<AccountsList initialAccounts={accounts} />
|
|
</div>
|
|
);
|
|
}
|