a103a2ee2c
* Set a cookie with an up-to-date Firebase ID token * Implement server-side authentication cookie reading logic * Change index page to redirect for authed users * No branch necessary for logged in users on index page * Add helpers for creating server-side redirects * Add some common sense redirects
11 lines
310 B
TypeScript
11 lines
310 B
TypeScript
import Router from 'next/router'
|
|
import { redirectIfLoggedOut } from 'web/lib/firebase/server-auth'
|
|
|
|
export const getServerSideProps = redirectIfLoggedOut('/')
|
|
|
|
// Deprecated: redirects to /portfolio.
|
|
// Eventually, this will be removed.
|
|
export default function TradesPage() {
|
|
Router.replace('/portfolio')
|
|
}
|