manifold/web/pages/home.tsx
James Grugett 7da46050e5
Swap home and explore (#244)
* Add activity page. Copy explore page into home

* Update navbar with activity. Show explore instead if signed out.

* Move category selector into contract search

* Make algolia filter by category

* Default tag page to all filter
2022-05-17 12:56:10 -05:00

32 lines
703 B
TypeScript

import React from 'react'
import Router from 'next/router'
import { Page } from 'web/components/page'
import { Col } from 'web/components/layout/col'
import { useUser } from 'web/hooks/use-user'
import { ContractSearch } from 'web/components/contract-search'
const Home = () => {
const user = useUser()
if (user === null) {
Router.replace('/')
return <></>
}
return (
<Page assertUser="signed-in">
<Col className="mx-auto w-full">
<ContractSearch
querySortOptions={{
shouldLoadFromStorage: false,
defaultSort: '24-hour-vol',
}}
showCategorySelector
/>
</Col>
</Page>
)
}
export default Home