Link to All Markets from header

This commit is contained in:
Austin Chen 2021-12-14 01:03:16 -08:00
parent fe6531cf78
commit 1da3cc7725
2 changed files with 8 additions and 2 deletions

View File

@ -33,6 +33,12 @@ function SignInLink(props: { darkBackground?: boolean }) {
<> <>
{user ? ( {user ? (
<> <>
<Link href="/markets">
<a className={clsx('text-base font-medium', themeClasses)}>
All markets
</a>
</Link>
<Link href="/contract"> <Link href="/contract">
<a className={clsx('text-base font-medium', themeClasses)}> <a className={clsx('text-base font-medium', themeClasses)}>
Create a market Create a market

View File

@ -90,7 +90,7 @@ export default function Markets() {
const [query, setQuery] = useState('') const [query, setQuery] = useState('')
type Sort = 'createdTime' | 'volume' type Sort = 'createdTime' | 'volume'
const [sort, setSort] = useState('createdTime') const [sort, setSort] = useState('volume')
function check(corpus: String) { function check(corpus: String) {
return corpus.toLowerCase().includes(query.toLowerCase()) return corpus.toLowerCase().includes(query.toLowerCase())
@ -132,8 +132,8 @@ export default function Markets() {
value={sort} value={sort}
onChange={(e) => setSort(e.target.value as Sort)} onChange={(e) => setSort(e.target.value as Sort)}
> >
<option value="createdTime">Newest first</option>
<option value="volume">Most traded</option> <option value="volume">Most traded</option>
<option value="createdTime">Newest first</option>
</select> </select>
</div> </div>