Merge pull request #3132 from bluewave-labs/fix/theme-simplification-and-bug-fixes
Simplify theme and fix Redux state bugs
This commit is contained in:
9 files changed
+17
-77
No files matched your search
@@ -1,8 +1,9 @@
|
||||
import { Grid, Grid2 } from "@mui/material";
|
||||
import { Grid } from "@mui/material";
|
||||
import Card from "../Card/index.jsx";
|
||||
|
||||
const MonitorGrid = ({ shouldRender, monitors }) => {
|
||||
console.log(monitors);
|
||||
const MonitorGrid = ({ monitors, shouldRender = true }) => {
|
||||
if (!shouldRender) return null;
|
||||
|
||||
return (
|
||||
<Grid
|
||||
container
|
||||
@@ -11,7 +12,7 @@ const MonitorGrid = ({ shouldRender, monitors }) => {
|
||||
{monitors?.map((monitor) => (
|
||||
<Card
|
||||
monitor={monitor}
|
||||
key={monitor._id}
|
||||
key={monitor._id || monitor.id}
|
||||
/>
|
||||
))}
|
||||
</Grid>
|
||||
|
||||
@@ -33,7 +33,7 @@ const BREADCRUMBS = [{ name: `Settings`, path: "/settings" }];
|
||||
|
||||
const Settings = () => {
|
||||
// Redux state
|
||||
const { mode, language, timezone, showURL } = useSelector((state) => state.ui);
|
||||
const { mode, language = "en", timezone, showURL } = useSelector((state) => state.ui);
|
||||
|
||||
// Local state
|
||||
const [settingsData, setSettingsData] = useState({});
|
||||
|
||||
Reference in new issue
Block a user