2022-02-04 03:19:42 +00:00
|
|
|
import Router from 'next/router'
|
2022-04-03 20:48:25 +00:00
|
|
|
import { useEffect } from 'react'
|
2022-02-04 03:19:42 +00:00
|
|
|
|
2021-12-18 10:37:26 +00:00
|
|
|
import { useUser } from '../hooks/use-user'
|
2021-12-17 23:07:08 +00:00
|
|
|
|
2022-04-03 20:48:25 +00:00
|
|
|
// Deprecated: redirects to /portfolio.
|
|
|
|
// Eventually, this will be removed.
|
2021-12-24 21:06:01 +00:00
|
|
|
export default function TradesPage() {
|
2021-12-18 10:37:26 +00:00
|
|
|
const user = useUser()
|
2021-12-17 23:07:08 +00:00
|
|
|
|
2022-04-03 20:48:25 +00:00
|
|
|
useEffect(() => {
|
|
|
|
if (user === null) Router.replace('/')
|
|
|
|
else Router.replace('/portfolio')
|
|
|
|
})
|
2022-02-04 03:19:42 +00:00
|
|
|
|
2022-04-03 20:48:25 +00:00
|
|
|
return <></>
|
2021-12-17 23:07:08 +00:00
|
|
|
}
|