feat: add conditional mation logo by default
This commit is contained in:
22
packages/web/src/components/DefaultLogo/index.tsx
Normal file
22
packages/web/src/components/DefaultLogo/index.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import Typography from '@mui/material/Typography';
|
||||
import * as React from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import MationLogo from 'components/MationLogo';
|
||||
import useAutomatischInfo from 'hooks/useAutomatischInfo';
|
||||
|
||||
const DefaultLogo = () => {
|
||||
const { isMation, loading } = useAutomatischInfo();
|
||||
|
||||
if (loading) return <React.Fragment />;
|
||||
|
||||
if (isMation) return <MationLogo />;
|
||||
|
||||
return (
|
||||
<Typography variant="h6" component="h1" data-test="typography-logo" noWrap>
|
||||
<FormattedMessage id="brandText" />
|
||||
</Typography>
|
||||
);
|
||||
};
|
||||
|
||||
export default DefaultLogo;
|
Reference in New Issue
Block a user