Highlight the "Search in selected language" if coming from the hint
This commit is contained in:
parent
9665f7f4c2
commit
45181c61b8
1 changed files with 10 additions and 1 deletions
|
@ -1,4 +1,6 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
import { useHistory } from 'react-router-dom';
|
||||||
|
import { SEARCH_IN_LANGUAGE } from 'constants/hashes';
|
||||||
import { SETTINGS_GRP } from 'constants/settings';
|
import { SETTINGS_GRP } from 'constants/settings';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import * as SETTINGS from 'constants/settings';
|
import * as SETTINGS from 'constants/settings';
|
||||||
|
@ -22,6 +24,10 @@ type Props = {
|
||||||
|
|
||||||
export default function SettingAppearance(props: Props) {
|
export default function SettingAppearance(props: Props) {
|
||||||
const { clock24h, searchInLanguage, isAuthenticated, hideBalance, setClientSetting, setSearchInLanguage } = props;
|
const { clock24h, searchInLanguage, isAuthenticated, hideBalance, setClientSetting, setSearchInLanguage } = props;
|
||||||
|
const {
|
||||||
|
location: { hash },
|
||||||
|
} = useHistory();
|
||||||
|
const highlightSearchInLanguage = hash === `#${SEARCH_IN_LANGUAGE}`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
@ -43,7 +49,10 @@ export default function SettingAppearance(props: Props) {
|
||||||
<SettingLanguage />
|
<SettingLanguage />
|
||||||
</SettingsRow>
|
</SettingsRow>
|
||||||
|
|
||||||
<SettingsRow title={__('Search only in the selected language by default')}>
|
<SettingsRow
|
||||||
|
title={__('Search only in the selected language by default')}
|
||||||
|
highlighted={highlightSearchInLanguage}
|
||||||
|
>
|
||||||
<FormField
|
<FormField
|
||||||
name="search-in-language"
|
name="search-in-language"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
|
|
Loading…
Add table
Reference in a new issue