Enable conditional password update card in settings page

Added a conditional check for displaying the password update card in the account settings page based on the new `enablePasswordUpdate` feature flag. This ensures the card is shown only if the password update feature is supported.
This commit is contained in:
gbuomprisco
2024-08-13 12:58:24 +02:00
parent 2d6d95d72a
commit 085980316c
2 changed files with 18 additions and 13 deletions

View File

@@ -3,6 +3,7 @@ import { use } from 'react';
import { PersonalAccountSettingsContainer } from '@kit/accounts/personal-account-settings';
import { PageBody } from '@kit/ui/page';
import authConfig from '~/config/auth.config';
import featureFlagsConfig from '~/config/feature-flags.config';
import pathsConfig from '~/config/paths.config';
import { loadUserWorkspace } from '~/home/(user)/_lib/server/load-user-workspace';
@@ -11,6 +12,7 @@ import { withI18n } from '~/lib/i18n/with-i18n';
const features = {
enableAccountDeletion: featureFlagsConfig.enableAccountDeletion,
enablePasswordUpdate: authConfig.providers.password,
};
const paths = {