Skip to content

Instantly share code, notes, and snippets.

@meetbryce
Created September 23, 2022 15:08
Show Gist options
  • Save meetbryce/f6904aa802364fe7d7a5bd0e38322629 to your computer and use it in GitHub Desktop.
Save meetbryce/f6904aa802364fe7d7a5bd0e38322629 to your computer and use it in GitHub Desktop.
Hydration error while using helper
import {NextPage} from 'next';
import styles from '../styles/Home.module.css';
import Meta from '../components/Meta';
import Header from '../components/Header';
import Footer from '../components/Footer';
import {withPageAuth} from '@supabase/auth-helpers-nextjs';
export const getServerSideProps = withPageAuth({redirectTo: '/login'});
const Profile: NextPage = ({user}) => {
return (
<div className={styles.container}>
<Meta titlePrefix={`Login`} description={'todo'}></Meta>
<Header />
<main className={styles.main}>
<h1 className={styles.title}>Welcome back!</h1>
<p>
<pre>{JSON.stringify(user)}</pre>
</p>
</main>
<Footer />
</div>
);
};
export default Profile;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment