don't render bg svg on light mode
This commit is contained in:
1 parent
6913bd0179
commit
35aa5162ca
1 file changed
+3
-2
@@ -2,16 +2,17 @@ import Box from "@mui/material/Box";
|
|||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
import { useTheme } from "@emotion/react";
|
import { useTheme } from "@emotion/react";
|
||||||
import BackgroundSVG from "../../../assets/Images/background.svg";
|
import BackgroundSVG from "../../../assets/Images/background.svg";
|
||||||
|
import { useSelector } from "react-redux";
|
||||||
|
|
||||||
const AppLayout = ({ children }) => {
|
const AppLayout = ({ children }) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
const ui = useSelector((state) => state.ui);
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
minHeight: "100vh",
|
minHeight: "100vh",
|
||||||
backgroundColor: theme.palette.primaryBackground.main,
|
backgroundColor: theme.palette.primaryBackground.main,
|
||||||
backgroundImage: `url("${BackgroundSVG}")`,
|
backgroundImage: ui?.mode === "dark" ? `url("${BackgroundSVG}")` : "none",
|
||||||
backgroundSize: "100% 100%",
|
backgroundSize: "100% 100%",
|
||||||
backgroundPosition: "center",
|
backgroundPosition: "center",
|
||||||
backgroundRepeat: "no-repeat",
|
backgroundRepeat: "no-repeat",
|
||||||
|
|||||||
Reference in new issue
Block a user