Update itemDetail page and fix few stuff #26

This commit is contained in:
prayag17 committed 2023-04-12 15:05:16 +05:30
1 parent 9ad438429f
commit d73eade38a
13 files changed
+875 -195

No files matched your search

+2
View File
@@ -42,6 +42,8 @@ export const AppBar = () => {
let usr = await getUserApi(window.api).getCurrentUser();
return usr.data;
},
enabled: visible,
networkMode: "always",
});
const trigger = useScrollTrigger({
+10 -1
View File
@@ -2,6 +2,8 @@
import React, { useState } from "react";
import PropTypes from "prop-types";
import { useNavigate } from "react-router-dom";
import Box from "@mui/material/Box";
import MuiCard from "@mui/material/Card";
import CardContent from "@mui/material/CardContent";
@@ -46,6 +48,7 @@ export const Card = ({
currentUser,
favourite,
}) => {
const navigate = useNavigate();
const [imgLoading, setImgLoading] = useState(true);
const [isWatched, setIsWatched] = useState(watchedStatus);
const [isFavourite, setIsFavourite] = useState(favourite);
@@ -132,7 +135,13 @@ export const Card = ({
{...cardProps}
>
<CardActionArea
onClick={!!onClickEvent ? onClickEvent : () => {}}
onClick={
!!onClickEvent
? onClickEvent
: () => {
navigate(`/item/${itemId}`);
}
}
>
<Box
className="card-media-container"
+2 -1
View File
@@ -71,6 +71,7 @@ export const SideMenu = ({}) => {
return usr.data;
},
enabled: false,
networkMode: "always",
});
let libraries = useQuery({
queryKey: ["libraries"],
@@ -81,6 +82,7 @@ export const SideMenu = ({}) => {
return libs.data;
},
enabled: !!user.data,
networkMode: "always",
});
const handleDrawerOpen = () => {};
const dispatch = useDispatch();
@@ -133,7 +135,6 @@ export const SideMenu = ({}) => {
background: backdrop
? theme.palette.background.paper
: "transparent",
borderLeft: "1px solid white",
}}
>
<DrawerHeader