From 45181c61b8b42734c49d1f272049587b13ac1b29 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Fri, 25 Feb 2022 18:36:58 +0800 Subject: [PATCH] Highlight the "Search in selected language" if coming from the hint --- ui/component/settingAppearance/view.jsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ui/component/settingAppearance/view.jsx b/ui/component/settingAppearance/view.jsx index 7fe719433..5fd6323d8 100644 --- a/ui/component/settingAppearance/view.jsx +++ b/ui/component/settingAppearance/view.jsx @@ -1,4 +1,6 @@ // @flow +import { useHistory } from 'react-router-dom'; +import { SEARCH_IN_LANGUAGE } from 'constants/hashes'; import { SETTINGS_GRP } from 'constants/settings'; import React from 'react'; import * as SETTINGS from 'constants/settings'; @@ -22,6 +24,10 @@ type Props = { export default function SettingAppearance(props: Props) { const { clock24h, searchInLanguage, isAuthenticated, hideBalance, setClientSetting, setSearchInLanguage } = props; + const { + location: { hash }, + } = useHistory(); + const highlightSearchInLanguage = hash === `#${SEARCH_IN_LANGUAGE}`; return ( <> @@ -43,7 +49,10 @@ export default function SettingAppearance(props: Props) { - +