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