feat: Render Blank icon if theme isn't mounted yet

This commit is contained in:
Trillium Smith 2024-06-19 13:09:12 -07:00
parent 1101b2c266
commit 3044443bf1

View File

@ -57,7 +57,9 @@ const ThemeSwitch = () => {
<div className="mr-5">
<Menu as="div" className="relative inline-block text-left">
<div>
<Menu.Button>{resolvedTheme === 'dark' ? <Moon /> : <Sun />}</Menu.Button>
<Menu.Button>
{mounted ? resolvedTheme === 'dark' ? <Moon /> : <Sun /> : <Blank />}
</Menu.Button>
</div>
<Transition
as={Fragment}