Skip to content

Commit 2bcc087

Browse files
committed
refacor: use sx (remove makeStyles) on admin navbar component
1 parent 26a9753 commit 2bcc087

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

src/components/admin/Navbar/index.tsx

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import {
1010
Typography,
1111
IconButton,
1212
} from '@mui/material';
13-
import { makeStyles } from '@mui/styles'
1413
import AddIcon from '@mui/icons-material/Add';
1514
import WidgetsIcon from '@mui/icons-material/Widgets';
1615
import AccountCircleIcon from '@mui/icons-material/AccountCircle';
@@ -19,18 +18,11 @@ import { ref, onValue, DataSnapshot } from '@firebase/database';
1918
import { auth, db } from '@/lib/firebase';
2019
import { AddProfileDialog, AddWidgetDialog } from '@/components/admin/Dialog';
2120

22-
const useStyles = makeStyles((_) => ({
23-
title: {
24-
flexGrow: 1,
25-
},
26-
}));
27-
2821
type NavbarProps = {
2922
profile?: string;
3023
}
3124

3225
const Navbar = ({ profile }: NavbarProps) => {
33-
const classes = useStyles();
3426
const router = useRouter();
3527

3628
const [userAnchorEl, setUserAnchorEl] = useState<HTMLElement | null>(null);
@@ -79,10 +71,10 @@ const Navbar = ({ profile }: NavbarProps) => {
7971
<>
8072
<AppBar position="static">
8173
<Toolbar>
82-
<Typography variant="h6" className={classes.title}>
74+
<Typography variant="h6" sx={{ flexGrow: 1 }}>
8375
Admin
8476
</Typography>
85-
{profile && (<Typography variant="h6" className={classes.title}>
77+
{profile && (<Typography variant="h6" sx={{ flexGrow: 1 }}>
8678
Profile:{' '}
8779
{profile}
8880
</Typography>)}

0 commit comments

Comments
 (0)