nextjs auth redirects when already logged in

how to redirect to /u/dashboard (protected page) with @supabase/auth-helpers-nextjs when user is already logged in?

// login.tsx
export const getServerSideProps: GetServerSideProps = async (context) => {
  return { props: {} }
}
Was this page helpful?