1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

fix search navigation on localhost (#346)

* fix search navigation on localhost

* fix navigate in asset query
This commit is contained in:
mihaisc 2021-01-28 13:05:50 +02:00 committed by GitHub
parent 095cf064c8
commit 6122ad2121
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -1,5 +1,5 @@
import React, { useState, ChangeEvent, FormEvent, ReactElement } from 'react'
import { useNavigate } from '@reach/router'
import { navigate } from 'gatsby'
import styles from './SearchBar.module.css'
import Button from '../atoms/Button'
import Input from '../atoms/Input'
@ -17,7 +17,6 @@ export default function SearchBar({
filters?: boolean
size?: 'small' | 'large'
}): ReactElement {
const navigate = useNavigate()
const [value, setValue] = useState(initialValue || '')
function handleChange(e: ChangeEvent<HTMLInputElement>) {

View File

@ -1,7 +1,8 @@
import AssetTeaser from '../molecules/AssetTeaser'
import React from 'react'
import { QueryResult } from '@oceanprotocol/lib/dist/node/metadatacache/MetadataCache'
import { useLocation, useNavigate } from '@reach/router'
import { useLocation } from '@reach/router'
import { navigate } from 'gatsby'
import Pagination from '../molecules/Pagination'
import { updateQueryStringParameter } from '../../utils'
import styles from './AssetQueryList.module.css'
@ -20,7 +21,6 @@ const AssetQueryList: React.FC<AssetQueryListProps> = ({
className
}) => {
const location = useLocation()
const navigate = useNavigate()
// Construct the urls on the pagination links. This is only for UX,
// since the links are no <Link> they will not work by itself.