manifold/web/pages/trades.tsx

18 lines
379 B
TypeScript
Raw Normal View History

import Router from 'next/router'
import { useEffect } from 'react'
2021-12-18 10:37:26 +00:00
import { useUser } from '../hooks/use-user'
2021-12-17 23:07:08 +00:00
// Deprecated: redirects to /portfolio.
// Eventually, this will be removed.
export default function TradesPage() {
2021-12-18 10:37:26 +00:00
const user = useUser()
2021-12-17 23:07:08 +00:00
useEffect(() => {
if (user === null) Router.replace('/')
else Router.replace('/portfolio')
})
return <></>
2021-12-17 23:07:08 +00:00
}