mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-02 02:00:49 +08:00
fix: lint
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||
import { EditorSettingService } from '@affine/core/modules/editor-setting';
|
||||
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||
import { ThemeEditorService } from '@affine/core/modules/theme-editor';
|
||||
import { useLiveData, useServices } from '@toeverything/infra';
|
||||
import { useTheme } from 'next-themes';
|
||||
@@ -8,11 +8,12 @@ import { useEffect } from 'react';
|
||||
let _provided = false;
|
||||
|
||||
export const CustomThemeModifier = () => {
|
||||
const { themeEditorService, featureFlagService, editorSettingService } = useServices({
|
||||
ThemeEditorService,
|
||||
FeatureFlagService,
|
||||
EditorSettingService,
|
||||
});
|
||||
const { themeEditorService, featureFlagService, editorSettingService } =
|
||||
useServices({
|
||||
ThemeEditorService,
|
||||
FeatureFlagService,
|
||||
EditorSettingService,
|
||||
});
|
||||
const enableThemeEditor = useLiveData(
|
||||
featureFlagService.flags.enable_theme_editor.$
|
||||
);
|
||||
@@ -51,7 +52,10 @@ export const CustomThemeModifier = () => {
|
||||
// Apply font size CSS variable when settings change
|
||||
useEffect(() => {
|
||||
if (settings.fontSize) {
|
||||
document.documentElement.style.setProperty('--affine-font-base', `${settings.fontSize}px`);
|
||||
document.documentElement.style.setProperty(
|
||||
'--affine-font-base',
|
||||
`${settings.fontSize}px`
|
||||
);
|
||||
}
|
||||
}, [settings.fontSize]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user