Skip to content

Commit

Permalink
Merge pull request wso2#4503 from JayaShakthi97/bug-fix-branding
Browse files Browse the repository at this point in the history
Improve text branding section logic
  • Loading branch information
JayaShakthi97 authored Nov 6, 2023
2 parents 3a9effe + 2286beb commit 2117560
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/perfect-forks-perform.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wso2is/console": patch
---

Improve text branding section logic
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import useGetBrandingPreferenceResolve from "../api/use-get-branding-preference-
import useGetCustomTextPreference from "../api/use-get-custom-text-preference";
import useGetCustomTextPreferenceFallbacks from "../api/use-get-custom-text-preference-fallbacks";
import useGetCustomTextPreferenceMeta from "../api/use-get-custom-text-preference-meta";
import { BrandingPreferencesConstants } from "../constants/branding-preferences-constants";
import { CustomTextPreferenceConstants } from "../constants/custom-text-preference-constants";
import AuthenticationFlowContext from "../context/branding-preference-context";
import { BrandingSubFeatures, PreviewScreenType } from "../models/branding-preferences";
Expand Down Expand Up @@ -363,7 +364,15 @@ const BrandingPreferenceProvider: FunctionComponent<BrandingPreferenceProviderPr
selectedLocale,
selectedScreen,
updateActiveCustomTextConfigurationMode: setActiveCustomTextConfigurationMode,
updateActiveTab: setActiveTab,
updateActiveTab: (tab: string) => {
// If the tab is the text tab, set the preview screen to common before changing the tab.
// This is done to overcome an issue occurred in only production.
if (tab === BrandingPreferencesConstants.TABS.TEXT_TAB_ID) {
setSelectedPreviewScreen(PreviewScreenType.COMMON);
}

setActiveTab(tab);
},
updateCustomTextFormSubscription: (
subscription: FormState<CustomTextInterface, CustomTextInterface>
): void => {
Expand Down

0 comments on commit 2117560

Please sign in to comment.