Created
April 22, 2024 21:12
-
-
Save PaulieScanlon/52fa203421d222d5ab14c38286ac746c to your computer and use it in GitHub Desktop.
Example of default page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// src/pages/default-page.tsx | |
import { ServerReadOnlyComponent } from '../components/server-read-only-component'; | |
const Page = async () => { | |
const userData = await getServerData(); | |
return ( | |
<main> | |
<ServerReadOnlyComponent userData={userData} /> | |
</main> | |
); | |
}; | |
const getServerData = async () => { | |
return { | |
isLoggedIn: true, | |
isAdmin: false, | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment