Skip to content

Commit

Permalink
Merge pull request #558 from paziresh24/fragment-package
Browse files Browse the repository at this point in the history
add feature flag for gozargah login button link
  • Loading branch information
AmirhBeigi authored Oct 6, 2024
2 parents 79f24fb + 696a415 commit 8809521
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ export const UserProfile = () => {
const isShowPremiumFeatures = useShowPremiumFeatures();
const dashboardDoctorList = useFeatureValue('dashboard:doctor-list', { ids: [''] });
const isEnabledDashboard = useFeatureIsOn('dashboard:enable');
const redirectToGozargah = useFeatureValue<{
destination?: string;
}>('redirect-to-gozargah', {});

const isShowDashboard =
!customize.partnerKey &&
Expand Down Expand Up @@ -122,6 +125,10 @@ export const UserProfile = () => {
}, [open]);

const handleLogin = () => {
if (redirectToGozargah?.destination) {
window.location.assign(redirectToGozargah?.destination);
return;
}
handleOpenLoginModal({
state: true,
});
Expand Down
2 changes: 1 addition & 1 deletion src/common/fragment/components/switch.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const switchMeta: CodeComponentMeta<SwitchType> = {
states: {
checked: {
type: 'writable',
variableType: 'text',
variableType: 'boolean',
valueProp: 'checked',
onChangeProp: 'onCheckedChange',
},
Expand Down

0 comments on commit 8809521

Please sign in to comment.