Skip to content

Commit

Permalink
feat(pages): reset /home
Browse files Browse the repository at this point in the history
  • Loading branch information
codingcodax committed Jul 16, 2024
1 parent 7f4a186 commit 93e4049
Showing 1 changed file with 8 additions and 41 deletions.
49 changes: 8 additions & 41 deletions apps/www/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,44 +1,11 @@
import { Suspense } from 'react';

import { api, HydrateClient } from '~/trpc/server';
import { AuthShowcase } from './_components/auth-showcase';
import {
CreatePostForm,
PostCardSkeleton,
PostList,
} from './_components/posts';

export const runtime = 'edge';

export default function HomePage() {
// You can await this here if you don't want to show Suspense fallback below
void api.post.all.prefetch();
import type { NextPage } from "next";

const Home: NextPage = () => {
return (
<HydrateClient>
<main className='container h-screen py-16'>
<div className='flex flex-col items-center justify-center gap-4'>
<h1 className='text-5xl font-extrabold tracking-tight sm:text-[5rem]'>
Create <span className='text-primary'>T3</span> Turbo
</h1>
<AuthShowcase />

<CreatePostForm />
<div className='w-full max-w-2xl overflow-y-scroll'>
<Suspense
fallback={
<div className='flex w-full flex-col gap-4'>
<PostCardSkeleton />
<PostCardSkeleton />
<PostCardSkeleton />
</div>
}
>
<PostList />
</Suspense>
</div>
</div>
</main>
</HydrateClient>
<div>
<p>home page</p>
</div>
);
}
};

export default Home;

0 comments on commit 93e4049

Please sign in to comment.