Skip to content

Commit

Permalink
fix css
Browse files Browse the repository at this point in the history
  • Loading branch information
tonytc13579 committed Jan 2, 2024
1 parent dffb70a commit 6efb23b
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/app/blockchains/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const TCPage = () => {
headerProps={{
color: 'black',
position: 'relative',
bgColor: 'white',
bgColor: '#F3F1E8',
}}
>
<IframeTCDynamic iframeURL={`${iframeDomain}${pathUrl}`} />
Expand Down
45 changes: 20 additions & 25 deletions src/modules/iframe-tc/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,45 +22,40 @@ const IframeTC = (props: IProps) => {
elmHeader.click();
}
}
setIframeLoading(false);
return () => window.removeEventListener('blur', blur);
}, [document]);

if (!document) {
return <></>;
}
if (iframeLoading) {
return (
<Flex
flex={1}
minHeight={'100%'}
justify={'center'}
align={'center'}
bgColor={'white'}
>
<Spinner color={'black'}></Spinner>
</Flex>
);
}
return (
<div
className={s.container}
style={{
height:
heightWidth -
(elmHeader && elmHeader.offsetHeight ? elmHeader.offsetHeight : 80),
}}
>
<div className={s.container} style={{}}>
<iframe
id="TC_PAGE_IFRAME"
src={props.iframeURL}
width="100%"
style={{ border: 'none' }}
onLoadedData={() => {}}
width={'100%'}
height={'100%'}
style={{ border: 'none', opacity: iframeLoading ? 0 : 1 }}
onLoad={() => {
setIframeLoading(false);
}}
/>
{iframeLoading && (
<Flex
flex={1}
pos={'absolute'}
top={0}
left={0}
right={0}
bottom={0}
minHeight={'100vh'}
justify={'center'}
align={'center'}
bgColor={'#F3F1E8'}
>
<Spinner color={'black'}></Spinner>
</Flex>
)}
</div>
);
};
Expand Down
1 change: 1 addition & 0 deletions src/modules/iframe-tc/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
display: flex;
flex-direction: row;
overflow: hidden;
min-height: 100vh;
}

.iframeGame {
Expand Down

0 comments on commit 6efb23b

Please sign in to comment.