manifold/web/pages/trades.tsx
Marshall Polaris a103a2ee2c
Initial draft of Vercel Firebase auth (#593)
* 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
2022-07-19 00:50:11 -07:00

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')
}