Merge branch 'main' into fix-permission-handling
This commit is contained in:
commit
3f42e0e945
5 changed files with 92 additions and 44 deletions
|
@ -5,7 +5,7 @@ import { ThemeProvider, createTheme } from "@mui/material/styles";
|
|||
import { useLiveQuery } from "dexie-react-hooks";
|
||||
import { BrowserRouter, Outlet, Route, Routes, useParams } from "react-router-dom";
|
||||
import { AllSubscriptions, SingleSubscription } from "./Notifications";
|
||||
import themeOptions, { darkPalette, lightPalette } from "./theme";
|
||||
import { darkTheme, lightTheme } from "./theme";
|
||||
import Navigation from "./Navigation";
|
||||
import ActionBar from "./ActionBar";
|
||||
import Preferences from "./Preferences";
|
||||
|
@ -45,13 +45,7 @@ const App = () => {
|
|||
const prefersDarkMode = useMediaQuery("(prefers-color-scheme: dark)");
|
||||
const themePreference = useLiveQuery(() => prefs.theme());
|
||||
const theme = React.useMemo(
|
||||
() =>
|
||||
createTheme({
|
||||
...themeOptions,
|
||||
palette: {
|
||||
...(darkModeEnabled(prefersDarkMode, themePreference) ? darkPalette : lightPalette),
|
||||
},
|
||||
}),
|
||||
() => createTheme(darkModeEnabled(prefersDarkMode, themePreference) ? darkTheme : lightTheme),
|
||||
[prefersDarkMode, themePreference]
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue