CoastalCommitsPastes/client/app/(home)/page.tsx

22 lines
569 B
TypeScript
Raw Normal View History

import Header from "@components/header"
import { getCurrentUser } from "@lib/server/session"
2022-11-09 21:38:05 -05:00
import { getWelcomeContent } from "pages/api/welcome"
2022-11-10 02:11:36 -05:00
import Home from "./home"
2022-11-09 21:38:05 -05:00
const getWelcomeData = async () => {
const welcomeContent = await getWelcomeContent()
return welcomeContent
}
export default async function Page() {
2022-11-10 02:11:36 -05:00
const { content, rendered, title } = await getWelcomeData()
const authed = await getCurrentUser();
return (
<>
<Header signedIn={Boolean(authed)}/>
<Home rendered={rendered} introContent={content} introTitle={title} />
</>
)
2022-11-09 01:14:43 -05:00
}