Skip to content

Commit

Permalink
feat(neuron-ui): use go back instead of go to overview in the setting…
Browse files Browse the repository at this point in the history
…s view
  • Loading branch information
Keith-CY committed Jul 24, 2019
1 parent 80683dc commit 4c9f8fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/neuron-ui/src/components/Settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ const Settings = ({
...neuronWalletState
}: React.PropsWithoutRef<StateWithDispatch & RouteComponentProps>) => {
const [t] = useTranslation()
const goToOverview = useCallback(() => {
history.push(Routes.Overview)
const goBack = useCallback(() => {
history.goBack()
}, [history])

return (
<Stack tokens={{ childrenGap: 15 }}>
<Stack horizontal>
<Stack.Item align="center">
<IconButton onClick={goToOverview} styles={{ root: { marginRight: 20 } }}>
<IconButton onClick={goBack} styles={{ root: { marginRight: 20 } }}>
<FormPreviousLink />
</IconButton>
</Stack.Item>
Expand All @@ -69,7 +69,7 @@ const Settings = ({
selectedKey={location.pathname}
onLinkClick={(pivotItem?: PivotItem) => {
if (pivotItem && pivotItem.props && pivotItem.props.itemKey) {
history.push(pivotItem.props.itemKey)
history.replace(pivotItem.props.itemKey)
}
}}
headersOnly
Expand Down

0 comments on commit 4c9f8fc

Please sign in to comment.