Skip to content

Commit

Permalink
simplified theme config.
Browse files Browse the repository at this point in the history
  • Loading branch information
suous committed Sep 13, 2024
1 parent 3fc1ed5 commit de1f679
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "waview",
"private": true,
"version": "0.1.0",
"version": "0.1.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "waview"
version = "0.1.0"
version = "0.1.1"
description = "A Tauri App"
authors = ["suous"]
edition = "2021"
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
},
"package": {
"productName": "waview",
"version": "0.1.0"
"version": "0.1.1"
},
"tauri": {
"allowlist": {
Expand Down
3 changes: 1 addition & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ const Wrapper = (): JSX.Element => {
const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)');
const { theme } = useViewConfig();

const systemTheme = React.useMemo(() => (prefersDarkMode ? 'dark' : 'light'), [prefersDarkMode]);

const systemTheme = prefersDarkMode ? 'dark' : 'light';
const defaultTheme = React.useMemo(
() => createAppTheme(theme === 'system' ? systemTheme : theme),
[systemTheme, theme]
Expand Down

0 comments on commit de1f679

Please sign in to comment.