NextJS - Login Redirect based on user role

Next.js docs on server-side redirect: Data Fetching: getServerSideProps | Next.js