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

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