change structure config app

This commit is contained in:
AmirHossein Mahmoodi
2024-01-23 11:42:46 +03:30
parent 0c2448e70d
commit 84bbe3e637
5 changed files with 28 additions and 12 deletions

View File

@@ -4,13 +4,11 @@ import {useConfig} from "@witel/webapp-builder";
const Banner = () => {
const {config} = useConfig();
const bannerHTML = config.banner;
return (
<Box sx={{backgroundColor: "primary.light"}}>
<Container sx={{py: 0.7}} maxWidth="xl">
<div dangerouslySetInnerHTML={{__html: bannerHTML}}/>
</Container>
</Box>
);
return (<Box sx={{backgroundColor: "primary.light"}}>
{config.banner && config.banner !== "" && (<Container sx={{py: 0.7}} maxWidth="xl">
<div dangerouslySetInnerHTML={{__html: bannerHTML}}/>
</Container>)}
</Box>);
};
export default Banner;