2022-11-12 04:28:06 -05:00
|
|
|
import Header from "@components/header"
|
2022-11-12 19:06:23 -05:00
|
|
|
import PageWrapper from "@components/page-wrapper"
|
2022-11-11 22:17:44 -05:00
|
|
|
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()
|
2022-11-11 22:17:44 -05:00
|
|
|
const authed = await getCurrentUser();
|
2022-11-12 03:58:21 -05:00
|
|
|
|
2022-11-11 22:17:44 -05:00
|
|
|
return (
|
2022-11-12 19:06:23 -05:00
|
|
|
<PageWrapper signedIn={Boolean(authed)}>
|
|
|
|
<Home rendered={rendered as string} introContent={content} introTitle={title} />
|
|
|
|
</PageWrapper>
|
2022-11-11 22:17:44 -05:00
|
|
|
)
|
2022-11-09 01:14:43 -05:00
|
|
|
}
|