diff --git a/apps/admin-x-settings/src/components/settings/growth/offers/AddOfferModal.tsx b/apps/admin-x-settings/src/components/settings/growth/offers/AddOfferModal.tsx index ce50b43f07..a467abe2aa 100644 --- a/apps/admin-x-settings/src/components/settings/growth/offers/AddOfferModal.tsx +++ b/apps/admin-x-settings/src/components/settings/growth/offers/AddOfferModal.tsx @@ -611,6 +611,7 @@ const AddOfferModal = () => { const iframe = ; return { diff --git a/apps/admin-x-settings/src/components/settings/growth/offers/EditOfferModal.tsx b/apps/admin-x-settings/src/components/settings/growth/offers/EditOfferModal.tsx index 376447a5cb..cd6534a479 100644 --- a/apps/admin-x-settings/src/components/settings/growth/offers/EditOfferModal.tsx +++ b/apps/admin-x-settings/src/components/settings/growth/offers/EditOfferModal.tsx @@ -249,6 +249,7 @@ const EditOfferModal: React.FC<{id: string}> = ({id}) => { const iframe = ; return offerById ? void; selectedTab?: string; + portalParent?: string; } -const PortalFrame: React.FC = ({href, onDestroyed, selectedTab}) => { +const PortalFrame: React.FC = ({href, onDestroyed, selectedTab, portalParent}) => { if (!selectedTab) { selectedTab = 'signup'; } @@ -49,11 +50,19 @@ const PortalFrame: React.FC = ({href, onDestroyed, selectedTab return null; } + let loaderClassNames = 'mt-[-7%] flex h-screen items-center justify-center'; + let loaderVisibility = 'hidden'; + + if (portalParent === 'preview') { + loaderClassNames = 'absolute z-50 mt-[-7%] flex h-screen items-center justify-center'; + loaderVisibility = 'invisible'; + } + return ( - <>{isInvisible &&
} + <>{isInvisible &&
}