mirror of
https://github.com/logto-io/logto.git
synced 2025-01-27 21:39:16 -05:00
Merge pull request #1486 from logto-io/charles-log-3543-provide-fallback-value-for-language-selection-in-settings
fix(console): provide fallback value for language field in settings
This commit is contained in:
commit
b8aea3b407
1 changed files with 5 additions and 2 deletions
|
@ -19,7 +19,10 @@ import ChangePassword from './components/ChangePassword';
|
|||
import * as styles from './index.module.scss';
|
||||
|
||||
const Settings = () => {
|
||||
const { t } = useTranslation(undefined, { keyPrefix: 'admin_console' });
|
||||
const {
|
||||
t,
|
||||
i18n: { language },
|
||||
} = useTranslation(undefined, { keyPrefix: 'admin_console' });
|
||||
const { data, error, update, isLoading, isLoaded } = useUserPreferences();
|
||||
const {
|
||||
handleSubmit,
|
||||
|
@ -53,7 +56,7 @@ const Settings = () => {
|
|||
control={control}
|
||||
render={({ field: { value, onChange } }) => (
|
||||
<Select
|
||||
value={value}
|
||||
value={value ?? language}
|
||||
options={[
|
||||
{
|
||||
value: Language.English,
|
||||
|
|
Loading…
Add table
Reference in a new issue