mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 12:28:42 +00:00
refactor: remove unused code (#2425)
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import type { ThemeProviderProps } from '@affine/component';
|
||||
import { ThemeProvider as NextThemeProvider, useTheme } from 'next-themes';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import { memo, useRef } from 'react';
|
||||
@@ -21,12 +20,9 @@ const DesktopThemeSync = memo(function DesktopThemeSync() {
|
||||
return null;
|
||||
});
|
||||
|
||||
export const ThemeProvider = ({
|
||||
children,
|
||||
...props
|
||||
}: PropsWithChildren<ThemeProviderProps>) => {
|
||||
export const ThemeProvider = ({ children }: PropsWithChildren) => {
|
||||
return (
|
||||
<NextThemeProvider themes={themes} enableSystem={true} {...props}>
|
||||
<NextThemeProvider themes={themes} enableSystem={true}>
|
||||
{children}
|
||||
<DesktopThemeSync />
|
||||
</NextThemeProvider>
|
||||
|
||||
Reference in New Issue
Block a user