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