diff --git a/components/Blog/ThemeSwitch.tsx b/components/Blog/ThemeSwitch.tsx index 46c868b..8b18d68 100644 --- a/components/Blog/ThemeSwitch.tsx +++ b/components/Blog/ThemeSwitch.tsx @@ -20,9 +20,8 @@ const ThemeSwitch: NextPage<{ size?: string }> = ({ size }) => { setMounted(true); }, []); - const switchTheme = (newTheme: string) => { - console.log(newTheme); - if (newTheme === "dark") setFadeProps({ + const switchTheme = (theme: string) => { + if (theme === "dark") setFadeProps({ sun: styles.fadeIn, moon: styles.fadeOut }); @@ -31,16 +30,16 @@ const ThemeSwitch: NextPage<{ size?: string }> = ({ size }) => { moon: styles.fadeIn }); - setTheme(newTheme); + setTheme(theme); }; if (!mounted) { return