acc9c84e2e
* Configure functions module to allow absolute imports * Convert common imports in functions to be absolute * Convert common imports in web to be absolute * Convert lib imports in web to be absolute * Convert hooks imports in web to be absolute * Convert components imports in web to be absolute
18 lines
380 B
TypeScript
18 lines
380 B
TypeScript
import Router from 'next/router'
|
|
import { useEffect } from 'react'
|
|
|
|
import { useUser } from 'web/hooks/use-user'
|
|
|
|
// Deprecated: redirects to /portfolio.
|
|
// Eventually, this will be removed.
|
|
export default function TradesPage() {
|
|
const user = useUser()
|
|
|
|
useEffect(() => {
|
|
if (user === null) Router.replace('/')
|
|
else Router.replace('/portfolio')
|
|
})
|
|
|
|
return <></>
|
|
}
|