Add navLink components to libraries menu
This commit is contained in:
2 files changed
+19
-20
No files matched your search
@@ -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(
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in new issue
Block a user