mirror of
https://github.com/ItzCrazyKns/Perplexica.git
synced 2025-06-07 10:28:37 +00:00
feat(components): use arrow function
This commit is contained in:
@ -1,14 +1,14 @@
|
||||
'use client';
|
||||
import { ThemeProvider } from 'next-themes';
|
||||
|
||||
export function ThemeProviderComponent({
|
||||
export const ThemeProviderComponent = ({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
}) => {
|
||||
return (
|
||||
<ThemeProvider attribute="class" enableSystem={false} defaultTheme="dark">
|
||||
{children}
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
@ -11,7 +11,7 @@ interface ThemeSwitcherProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
export function ThemeSwitcher({ size, className }: ThemeSwitcherProps) {
|
||||
export const ThemeSwitcher = ({ size, className }: ThemeSwitcherProps) => {
|
||||
const [mounted, setMounted] = useState(false);
|
||||
|
||||
const { theme, setTheme } = useTheme();
|
||||
@ -69,4 +69,4 @@ export function ThemeSwitcher({ size, className }: ThemeSwitcherProps) {
|
||||
onClick={() => handleThemeSwitch('system')}
|
||||
/>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user