Skip to content

Commit

Permalink
feat(neuron-ui): set page no to 1 on wallet switch
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Jul 30, 2019
1 parent 54e4bc0 commit 9aa8d67
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/neuron-ui/src/components/History/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ const History = ({
}: React.PropsWithoutRef<StateWithDispatch & RouteComponentProps>) => {
const [t] = useTranslation()

const { keywords, onKeywordsChange, setKeywords } = useSearch(search, id, dispatch)
const { keywords, onKeywordsChange } = useSearch(search, id, dispatch)
useEffect(() => {
if (id) {
setKeywords('')
history.push(`${Routes.History}?pageNo=1&keywords=${''}`)
}
}, [id, setKeywords])
}, [id, history])
const onSearch = useCallback(() => history.push(`${Routes.History}?keywords=${keywords}`), [history, keywords])

return (
Expand Down

0 comments on commit 9aa8d67

Please sign in to comment.