Add app backdrop

This commit is contained in:
Prayag Prajapati committed 2023-08-14 18:58:59 +05:30
1 parent c568cf2be4
commit 73085f736f
5 files changed
+66 -5

No files matched your search

+10
View File
@@ -53,6 +53,7 @@ import { ErrorBoundary } from "react-error-boundary";
import CarouselSlideError from "../../components/errors/carousel";
import { motion } from "framer-motion";
import { useBackdropStore } from "../../utils/store/backdrop";
const Home = () => {
const authUser = useQuery({
queryKey: ["home", "authenticateUser"],
@@ -196,6 +197,8 @@ const Home = () => {
});
}
const [setAppBackdrop] = useBackdropStore((state) => [state.setBackdrop]);
if (user.isPaused) {
user.refetch();
console.log(user.isError);
@@ -245,6 +248,13 @@ const Home = () => {
sx={{
marginBottom: "1.5em",
}}
onChange={(now) => {
console.log(latestMedia.data[now]);
setAppBackdrop(
`${window.api.basePath}/Items/${latestMedia.data[now].Id}/Images/Backdrop`,
latestMedia.data[now].Id,
);
}}
duration={400}
interval={10000}
>