feat: use dynamic custom logo

This commit is contained in:
Ali BARIN
2023-08-10 18:08:19 +00:00
parent f6c500c998
commit 03ea61ba81
5 changed files with 62 additions and 26 deletions

View File

@@ -0,0 +1,23 @@
import Typography from '@mui/material/Typography';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import CustomLogo from 'components/CustomLogo/index.ee';
import useConfig from 'hooks/useConfig';
const Logo = () => {
const { config, loading } = useConfig(['logo.svgData']);
const logoSvgData = config?.['logo.svgData'] as string;
if (loading && !logoSvgData) return (<React.Fragment />);
if (logoSvgData) return <CustomLogo />;
return (
<Typography variant="h6" component="h1" noWrap>
<FormattedMessage id="brandText" />
</Typography>
);
};
export default Logo;