refactor: remove unused code (#2425)

This commit is contained in:
Himself65
2023-05-17 17:15:12 -07:00
committed by GitHub
parent f875b37641
commit d6b640726e
8 changed files with 3 additions and 94 deletions

View File

@@ -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>