leerob / leerob.io

✨ My portfolio built with Next.js, Tailwind, and Vercel.

Home Page:https://leerob.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Theme toggle not working

aliemir opened this issue · comments

theme value is retrieved from useTheme as resolvedTheme

const { resolvedTheme, setTheme } = useTheme();

but in onClick it's referenced as theme

onClick={() => setTheme(theme === 'dark' ? 'light' : 'dark')}

resulting:

Uncaught ReferenceError: theme is not defined