From 99d168b4fe553fe266d20a3de35fc8e13d76f2ba Mon Sep 17 00:00:00 2001 From: nakajimayoshi Date: Tue, 11 Jul 2023 17:49:36 +0900 Subject: [PATCH] fixes --- src/index.tsx | 1 - src/pages/Home.tsx | 8 ++++---- src/pages/Settings.tsx | 1 - src/redux/global/configSlice.ts | 2 +- src/redux/global/ui/colors.ts | 2 +- src/redux/global/ui/uitheme.ts | 4 ++-- 6 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index b4d8cc8..58f8625 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -31,7 +31,6 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render( } /> } /> } /> - } /> diff --git a/src/pages/Home.tsx b/src/pages/Home.tsx index 0ed1892..7b1bbf4 100644 --- a/src/pages/Home.tsx +++ b/src/pages/Home.tsx @@ -83,17 +83,17 @@ export const Home: React.FC = () => { return ( <>
-

+
Welcome to ACE v{version} {/* eslint-disable-next-line jsx-a11y/control-has-associated-label */} - -

+
{ const returnToHome = () => { navigate('/'); - console.log('Return to home'); }; return ( diff --git a/src/redux/global/configSlice.ts b/src/redux/global/configSlice.ts index e6b56da..e13e881 100644 --- a/src/redux/global/configSlice.ts +++ b/src/redux/global/configSlice.ts @@ -22,7 +22,7 @@ interface ConfigState { const configSlice = createSlice({ name: 'config', initialState: { - theme: JSON.parse(localStorage.getItem(THEME_LOCAL_STORAGE_KEY)!) as ThemeConfig, + theme: JSON.parse(localStorage.getItem(THEME_LOCAL_STORAGE_KEY) || 'amethyst-dark') as ThemeConfig, } as ConfigState, reducers: { pushRecentProject(state, action: PayloadAction) { diff --git a/src/redux/global/ui/colors.ts b/src/redux/global/ui/colors.ts index 72b07c4..5a033f2 100644 --- a/src/redux/global/ui/colors.ts +++ b/src/redux/global/ui/colors.ts @@ -10,7 +10,7 @@ export interface ColorPalette { // using default export because tailwind.config.cjs doesn't support ESM modules. // eslint-disable-next-line import/no-default-export export default { - 'default-dark': { + 'amethyst-dark': { primary: '#B47EFA', secondary: '#9F59F8', text: '#ffffff', diff --git a/src/redux/global/ui/uitheme.ts b/src/redux/global/ui/uitheme.ts index 6807098..1551a7d 100644 --- a/src/redux/global/ui/uitheme.ts +++ b/src/redux/global/ui/uitheme.ts @@ -16,6 +16,6 @@ export const themeConfigs = new Map(); themes.forEach((theme) => themeConfigs.set(theme.name, theme)); export const fallbackThemeConfig: ThemeConfig = { - name: 'default-dark', - colors: colors['default-dark'], + name: 'amthyst-dark', + colors: colors['amethyst-dark'], };