'use client';
import { useContext, useState } from 'react';
import FlashcardForm from './FlashcardForm';
import Login from './Login';
import useUser from '../libs/pocketbase';
export default function Home() {
const { user } = useContext(useUser());
return (
<main className="grow grid place-items-center h-full">
{user ? <FlashcardForm /> : <Login />}
</main>
);
}
This component causes an error, because the server renders the login page, but the client renders the flashcard form and the initial UI doesn't match what the server rendered during hydration. How would I go about fixing it?