Add app backdrop
This commit is contained in:
5 files changed
+66
-5
No files matched your search
@@ -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}
|
||||
>
|
||||
|
||||
Reference in new issue
Block a user