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 { EditorSettingService } from '@affine/core/modules/editor-setting';
|
||||||
|
import { FeatureFlagService } from '@affine/core/modules/feature-flag';
|
||||||
import { ThemeEditorService } from '@affine/core/modules/theme-editor';
|
import { ThemeEditorService } from '@affine/core/modules/theme-editor';
|
||||||
import { useLiveData, useServices } from '@toeverything/infra';
|
import { useLiveData, useServices } from '@toeverything/infra';
|
||||||
import { useTheme } from 'next-themes';
|
import { useTheme } from 'next-themes';
|
||||||
@@ -8,11 +8,12 @@ import { useEffect } from 'react';
|
|||||||
let _provided = false;
|
let _provided = false;
|
||||||
|
|
||||||
export const CustomThemeModifier = () => {
|
export const CustomThemeModifier = () => {
|
||||||
const { themeEditorService, featureFlagService, editorSettingService } = useServices({
|
const { themeEditorService, featureFlagService, editorSettingService } =
|
||||||
ThemeEditorService,
|
useServices({
|
||||||
FeatureFlagService,
|
ThemeEditorService,
|
||||||
EditorSettingService,
|
FeatureFlagService,
|
||||||
});
|
EditorSettingService,
|
||||||
|
});
|
||||||
const enableThemeEditor = useLiveData(
|
const enableThemeEditor = useLiveData(
|
||||||
featureFlagService.flags.enable_theme_editor.$
|
featureFlagService.flags.enable_theme_editor.$
|
||||||
);
|
);
|
||||||
@@ -51,7 +52,10 @@ export const CustomThemeModifier = () => {
|
|||||||
// Apply font size CSS variable when settings change
|
// Apply font size CSS variable when settings change
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (settings.fontSize) {
|
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]);
|
}, [settings.fontSize]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user