Skip to content

Instantly share code, notes, and snippets.

@PaulieScanlon
Created April 22, 2024 21:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PaulieScanlon/52fa203421d222d5ab14c38286ac746c to your computer and use it in GitHub Desktop.
Save PaulieScanlon/52fa203421d222d5ab14c38286ac746c to your computer and use it in GitHub Desktop.
Example of default page
// 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