mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-20 19:46:32 +08:00
refactor: migrate environment to BUILD_CONFIG (#8206)
This commit is contained in:
@@ -10,7 +10,7 @@ const DesktopThemeSync = memo(function DesktopThemeSync() {
|
||||
const lastThemeRef = useRef(theme);
|
||||
const onceRef = useRef(false);
|
||||
if (lastThemeRef.current !== theme || !onceRef.current) {
|
||||
if (environment.isElectron && theme) {
|
||||
if (BUILD_CONFIG.isElectron && theme) {
|
||||
apis?.ui
|
||||
.handleThemeChange(theme as 'dark' | 'light' | 'system')
|
||||
.catch(err => {
|
||||
|
||||
Reference in New Issue
Block a user