Skip to content

Commit 9aa8d67

Browse files
committed
feat(neuron-ui): set page no to 1 on wallet switch
1 parent 54e4bc0 commit 9aa8d67

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • packages/neuron-ui/src/components/History

packages/neuron-ui/src/components/History/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ const History = ({
2525
}: React.PropsWithoutRef<StateWithDispatch & RouteComponentProps>) => {
2626
const [t] = useTranslation()
2727

28-
const { keywords, onKeywordsChange, setKeywords } = useSearch(search, id, dispatch)
28+
const { keywords, onKeywordsChange } = useSearch(search, id, dispatch)
2929
useEffect(() => {
3030
if (id) {
31-
setKeywords('')
31+
history.push(`${Routes.History}?pageNo=1&keywords=${''}`)
3232
}
33-
}, [id, setKeywords])
33+
}, [id, history])
3434
const onSearch = useCallback(() => history.push(`${Routes.History}?keywords=${keywords}`), [history, keywords])
3535

3636
return (

0 commit comments

Comments
 (0)