Fixed Portal preview flashing issue in Offers (#19862)

ref DES-101
This commit is contained in:
Sodbileg Gansukh 2024-03-14 14:29:17 +08:00 committed by GitHub
parent 52a28c0059
commit 2029a5846a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

@ -205,7 +205,7 @@ export const PreviewModalContent: React.FC<PreviewModalProps> = ({
}
const containerClasses = clsx(
'min-w-100 absolute inset-y-0 left-0 right-[400px] flex grow flex-col overflow-y-auto',
'min-w-100 absolute inset-y-0 left-0 right-[400px] flex w-full grow flex-col overflow-y-auto',
previewBgClass
);
@ -275,7 +275,7 @@ export const PreviewModalContent: React.FC<PreviewModalProps> = ({
hideXOnMobile
>
<div className='flex h-full grow'>
<div className={`hidden grow flex-col [@media(min-width:801px)]:!visible [@media(min-width:801px)]:!flex ${previewBgColor === 'grey' ? 'bg-grey-50' : 'bg-white'}`}>
<div className={`relative hidden grow flex-col [@media(min-width:801px)]:!visible [@media(min-width:801px)]:!flex ${previewBgColor === 'grey' ? 'bg-grey-50' : 'bg-white'}`}>
{preview}
</div>
{sidebar &&

View File

@ -56,6 +56,9 @@ const PortalFrame: React.FC<PortalFrameProps> = ({href, onDestroyed, selectedTab
if (portalParent === 'preview') {
loaderClassNames = 'absolute z-50 mt-[-7%] flex h-screen items-center justify-center';
loaderVisibility = 'invisible';
} else if (portalParent === 'offers') {
loaderClassNames = 'absolute z-50 flex w-full h-full items-center justify-center';
loaderVisibility = 'invisible';
}
return (