2022-05-17 17:56:10 +00:00
|
|
|
import React from 'react'
|
|
|
|
import Router from 'next/router'
|
2022-05-09 13:04:36 +00:00
|
|
|
import { Page } from 'web/components/page'
|
|
|
|
import { Col } from 'web/components/layout/col'
|
|
|
|
import { useUser } from 'web/hooks/use-user'
|
2022-05-17 17:56:10 +00:00
|
|
|
import { ContractSearch } from 'web/components/contract-search'
|
2022-01-23 00:16:23 +00:00
|
|
|
|
2022-04-09 23:10:58 +00:00
|
|
|
const Home = () => {
|
2022-01-23 00:16:23 +00:00
|
|
|
const user = useUser()
|
2022-04-11 21:13:26 +00:00
|
|
|
|
2022-01-23 00:16:23 +00:00
|
|
|
if (user === null) {
|
|
|
|
Router.replace('/')
|
|
|
|
return <></>
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
2022-05-17 17:56:10 +00:00
|
|
|
<Page assertUser="signed-in">
|
|
|
|
<Col className="mx-auto w-full">
|
|
|
|
<ContractSearch
|
|
|
|
querySortOptions={{
|
|
|
|
shouldLoadFromStorage: false,
|
|
|
|
defaultSort: '24-hour-vol',
|
|
|
|
}}
|
|
|
|
showCategorySelector
|
2022-04-11 21:13:26 +00:00
|
|
|
/>
|
2022-05-17 17:56:10 +00:00
|
|
|
</Col>
|
|
|
|
</Page>
|
2022-01-23 00:16:23 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default Home
|