Add Container and Prose components

This commit is contained in:
James Blair 2026-05-08 18:53:18 +12:00
parent c9ba6a6cc5
commit 80056b3728
Signed by: james
SSH key fingerprint: SHA256:hsDR3ENI2ZMgh+CNb+0PrFsj29DI007R+BMKUVGi6zQ
3 changed files with 21 additions and 5 deletions

View file

@ -1,14 +1,16 @@
import { Container } from "@/components/container";
import { Prose } from "@/components/prose";
import { api } from "@/lib/api/server"; import { api } from "@/lib/api/server";
export default async function Home() { export default async function Home() {
const { data: health } = await api.health.get(); const { data: health } = await api.health.get();
return ( return (
<main className="container mx-auto p-4 md:py-8"> <Container>
<section className="prose prose-neutral max-w-none"> <Prose>
<h1 className="text-3xl font-bold">Hackathon Template</h1> <h1>Hackathon Template</h1>
<pre>{JSON.stringify(health, null, 2)}</pre> <pre>{JSON.stringify(health, null, 2)}</pre>
</section> </Prose>
</main> </Container>
); );
} }

7
components/container.tsx Normal file
View file

@ -0,0 +1,7 @@
interface ContainerProps {
children: React.ReactNode;
}
export function Container({ children }: ContainerProps) {
return <div className="container mx-auto p-4 md:py-8">{children}</div>;
}

7
components/prose.tsx Normal file
View file

@ -0,0 +1,7 @@
interface ProseProps {
children: React.ReactNode;
}
export function Prose({ children }: ProseProps) {
return <div className="prose prose-neutral max-w-none">{children}</div>;
}