'use server';
import { preloadQuery } from 'convex/nextjs';
import { api } from '~/convex/_generated/api';
import { StatusTable } from '@/components/layout/status';

const StatusTablePage = async () => {
  const preloadedUser = await preloadQuery(api.auth.getUser);
  const preloadedStatuses = await preloadQuery(api.statuses.getCurrentForAll);
  return (
    <main>
      <StatusTable
        preloadedUser={preloadedUser}
        preloadedStatuses={preloadedStatuses}
      />
    </main>
  );
};
export default StatusTablePage;
