import { Link } from "react-router-dom"; import { useSessionContext } from "supertokens-auth-react/recipe/session"; export default function Home() { const session = useSessionContext(); if (session.loading) { return null; } return ( <> x SuperTokens x React example project {session.doesSessionExist ? ( You're signed in already, check out the Dashboard! 👇 ) : ( Sign-in to continue )} {session.doesSessionExist ? ( Dashboard ) : ( Sign-up / Login )} > ); }
You're signed in already, check out the Dashboard! 👇
Sign-in to continue