mirror of
https://github.com/DustinBrett/daedalOS.git
synced 2026-01-15 12:15:02 +00:00
Stricter TS rules
This commit is contained in:
@@ -2,6 +2,7 @@ import { SessionConsumer } from "contexts/session";
|
||||
import { ThemeProvider } from "styled-components";
|
||||
import GlobalStyle from "styles/GlobalStyle";
|
||||
import themes from "styles/themes";
|
||||
import { DEFAULT_THEME } from "utils/constants";
|
||||
|
||||
type StyledAppProps = {
|
||||
children: React.ReactNode;
|
||||
@@ -10,7 +11,7 @@ type StyledAppProps = {
|
||||
const StyledApp = ({ children }: StyledAppProps): JSX.Element => (
|
||||
<SessionConsumer>
|
||||
{({ themeName }) => (
|
||||
<ThemeProvider theme={themes[themeName] || themes.defaultTheme}>
|
||||
<ThemeProvider theme={themes[themeName] || themes[DEFAULT_THEME]}>
|
||||
<GlobalStyle />
|
||||
{children}
|
||||
</ThemeProvider>
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"noImplicitReturns": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve"
|
||||
|
||||
@@ -2,6 +2,8 @@ import type { Size } from "components/system/Window/RndWindow/useResizable";
|
||||
|
||||
export const DEFAULT_LOCALE = "en";
|
||||
|
||||
export const DEFAULT_THEME = "defaultTheme";
|
||||
|
||||
export const DEFAULT_WINDOW_SIZE: Size = {
|
||||
height: 200,
|
||||
width: 250,
|
||||
|
||||
Reference in New Issue
Block a user