Add Container and Prose components
This commit is contained in:
parent
c9ba6a6cc5
commit
80056b3728
3 changed files with 21 additions and 5 deletions
12
app/page.tsx
12
app/page.tsx
|
|
@ -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
7
components/container.tsx
Normal 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
7
components/prose.tsx
Normal 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>;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue