add darmode animation to fallback component

This commit is contained in:
karenvicent committed 2025-07-29 10:07:37 -04:00
1 parent d1e9a1221f
commit 24e7b1c224
2 files changed
+13 -16

No files matched your search

@@ -3,28 +3,25 @@ import Box from "@mui/material/Box";
import Background from "../../assets/Images/background-grid.svg?react"; import Background from "../../assets/Images/background-grid.svg?react";
import SkeletonDark from "../../assets/Images/create-placeholder-dark.svg?react"; import SkeletonDark from "../../assets/Images/create-placeholder-dark.svg?react";
import OutputAnimation from "../../assets/Animations/output.gif"; import OutputAnimation from "../../assets/Animations/output.gif";
import DarkmodeOutput from "../../assets/Animations/darkmodeOutput.gif";
import { useSelector } from "react-redux"; import { useSelector } from "react-redux";
const FallbackBackground = () => { const FallbackBackground = () => {
const theme = useTheme(); const theme = useTheme();
const mode = useSelector((state) => state.ui.mode); const mode = useSelector((state) => state.ui.mode);
return ( return (
<> <>
{mode === "light" ? ( <Box
<Box component="img"
component="img" src={mode === "light" ? OutputAnimation : DarkmodeOutput}
src={OutputAnimation} Background="transparent"
Background="transparent" alt="Loading animation"
alt="Loading animation" sx={{
sx={{ zIndex: 1,
zIndex: 1, border: "none",
border: "none", borderRadius: theme.spacing(8),
borderRadius: theme.spacing(8), width: "100%",
width: "100%", }}
}} />
/>
) : (
<SkeletonDark style={{ zIndex: 1 }} />
)}
<Box <Box
className="background-pattern-svg" className="background-pattern-svg"
sx={{ sx={{
Binary file not shown.

After

Width:  |  Height:  |  Size: 305 KiB