CoastalCommitsPastes/client/app/page.tsx

22 lines
582 B
TypeScript
Raw Normal View History

2022-11-12 03:58:21 -05:00
import Header from "app/components/header"
import { getCurrentUser } from "@lib/server/session"
2022-11-09 21:38:05 -05:00
import { getWelcomeContent } from "pages/api/welcome"
2022-11-12 03:58:21 -05:00
import Home from "./components/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();
2022-11-12 03:58:21 -05:00
return (
<>
<Header signedIn={Boolean(authed)}/>
<Home rendered={rendered} introContent={content} introTitle={title} />
</>
)
2022-11-09 01:14:43 -05:00
}