import { getAccountsPage } from "@/lib/api";
import AccountsTable from "@/components/accounts-table";

const PREFIX_PATTERN = process.env.NEXT_PUBLIC_CM_PREFIX_PATTERN ?? "13c";

export default async function AccountsPage() {
  const page = await getAccountsPage({ prefix: PREFIX_PATTERN, dir: "desc" });
  return (
    <AccountsTable
      initial={page.rows}
      initialHasMore={page.hasMore}
      prefixPattern={PREFIX_PATTERN}
    />
  );
}
