Add navLink components to libraries menu

This commit is contained in:
Prayag Prajapati committed 2023-12-29 10:46:39 +05:30
1 parent 66f63c6d75
commit bccc19981e
2 files changed
+19 -20

No files matched your search

+13 -20
View File
@@ -162,7 +162,8 @@ export const AppBar = () => {
paddingRight: "0 !important", paddingRight: "0 !important",
}} }}
className={trigger ? "appBar backdropVisible" : "appBar"} className={trigger ? "appBar backdropVisible" : "appBar"}
elevation={0} elevation={trigger ? 4 : 0}
color="transparent"
> >
<Toolbar <Toolbar
sx={{ sx={{
@@ -219,20 +220,6 @@ export const AppBar = () => {
<Menu <Menu
open={Boolean(librariesPopover)} open={Boolean(librariesPopover)}
anchorEl={librariesPopover} anchorEl={librariesPopover}
// anchorOrigin={{
// vertical: "bottom",
// horizontal: "right",
// }}
// transformOrigin={{
// vertical: "top",
// horizontal: "left",
// }}
// slotProps={{
// paper: {
// onMouseEnter: popoverEnter,
// onMouseLeave: popoverLeave,
// },
// }}
anchorOrigin={{ anchorOrigin={{
horizontal: "center", horizontal: "center",
vertical: "bottom", vertical: "bottom",
@@ -256,12 +243,18 @@ export const AppBar = () => {
: libraries.data.Items.map( : libraries.data.Items.map(
(library) => ( (library) => (
<MenuItem <MenuItem
key={library.Id} component={NavLink}
onClick={() => to={
navigate( "/library/" +
`/library/${library.Id}`, library.Id
)
} }
key={library.Id}
// onClick={() =>
// navigate(
// `/library/${library.Id}`,
// )
// }
className="appBar-library"
> >
<ListItemIcon> <ListItemIcon>
{getTypeIcon( {getTypeIcon(
+6
View File
@@ -60,6 +60,12 @@
object-fit: contain; object-fit: contain;
object-position: center; object-position: center;
} }
&-library {
transition: all 0.2s;
&.active {
background: $clr-gradient-default;
}
}
} }
.appLoading { .appLoading {