feat: link typography logo to dashboard

This commit is contained in:
Ali BARIN
2022-08-02 00:23:34 +02:00
parent a624a8d8b5
commit 10c64167d7
2 changed files with 21 additions and 8 deletions

View File

@@ -10,10 +10,12 @@ import MenuIcon from '@mui/icons-material/Menu';
import MenuOpenIcon from '@mui/icons-material/MenuOpen';
import AccountCircleIcon from '@mui/icons-material/AccountCircle';
import * as URLS from 'config/urls';
import AccountDropdownMenu from 'components/AccountDropdownMenu';
import Container from 'components/Container';
import HideOnScroll from 'components/HideOnScroll';
import { FormattedMessage } from 'react-intl';
import { Link } from './style';
type AppBarProps = {
drawerOpen: boolean;
@@ -63,14 +65,17 @@ export default function AppBar(props: AppBarProps): React.ReactElement {
{drawerOpen && matchSmallScreens ? <MenuOpenIcon /> : <MenuIcon />}
</IconButton>
<Typography
variant="h6"
noWrap
component="div"
sx={{ flexGrow: 1 }}
>
<FormattedMessage id="brandText" />
</Typography>
<div style={{ flexGrow: 1 }}>
<Link to={URLS.DASHBOARD}>
<Typography
variant="h6"
component="h1"
noWrap
>
<FormattedMessage id="brandText" />
</Typography>
</Link>
</div>
<IconButton
size="large"

View File

@@ -0,0 +1,8 @@
import { styled } from '@mui/material/styles';
import { Link as RouterLink } from 'react-router-dom';
export const Link = styled(RouterLink)(() => ({
textDecoration: 'none',
color: 'inherit',
display: 'inline-flex',
}));