Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nakajimayoshi committed Jul 11, 2023
1 parent e173527 commit 99d168b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
<Route index element={<Home />} />
<Route path="/workspace" element={<Workspace />} />
<Route path="/settings" element={<SettingsMenu />} />
<Route path="/appearancesettings" element={<AppearanceSettings />} />
</Routes>
</MemoryRouter>
</Provider>
Expand Down
8 changes: 4 additions & 4 deletions src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,17 @@ export const Home: React.FC = () => {
return (
<>
<div className="container px-20 pt-16 h-screen overflow-clip">
<h1 className="flex gap-4 items-center text-4xl text-theme-text mb-8">
<div className="flex gap-4 items-center text-4xl text-theme-text mb-8">
<span>Welcome to <span className="text-theme-primary font-medium">ACE</span></span>
<span
className="rounded-xl px-3 py-1 font-medium text-sm bg-theme-padding bg-opacity"
>v{version}
</span>
{/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}
<button onClick={navigateToSettings} className="rounded-md p-1 bg-theme-padding hover:opacity-50 transition">
<MdSettings />
<button onClick={navigateToSettings} className="ml-auto rounded-md p-1 hover:bg-theme-padding transition">
<MdSettings size={25} />
</button>
</h1>
</div>
<div className="grid grid-cols-2 gap-6 mb-16">
<Card
className="flex gap-4 items-center"
Expand Down
1 change: 0 additions & 1 deletion src/pages/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export const AppearanceSettings: React.FC = () => {

const returnToHome = () => {
navigate('/');
console.log('Return to home');
};

return (
Expand Down
2 changes: 1 addition & 1 deletion src/redux/global/configSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<AceProject>) {
Expand Down
2 changes: 1 addition & 1 deletion src/redux/global/ui/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions src/redux/global/ui/uitheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ export const themeConfigs = new Map<String, ThemeConfig>();
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'],
};

0 comments on commit 99d168b

Please sign in to comment.