From 4c9f8fc77b22f18068cf790f587daace1dda7603 Mon Sep 17 00:00:00 2001 From: Keith Date: Wed, 24 Jul 2019 12:43:28 +0800 Subject: [PATCH] feat(neuron-ui): use go back instead of go to overview in the settings view --- packages/neuron-ui/src/components/Settings/index.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/neuron-ui/src/components/Settings/index.tsx b/packages/neuron-ui/src/components/Settings/index.tsx index 7e98fcef76..706086e1b6 100644 --- a/packages/neuron-ui/src/components/Settings/index.tsx +++ b/packages/neuron-ui/src/components/Settings/index.tsx @@ -46,15 +46,15 @@ const Settings = ({ ...neuronWalletState }: React.PropsWithoutRef) => { const [t] = useTranslation() - const goToOverview = useCallback(() => { - history.push(Routes.Overview) + const goBack = useCallback(() => { + history.goBack() }, [history]) return ( - + @@ -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