feat: Render Blank icon if theme isn't mounted yet
This commit is contained in:
parent
1101b2c266
commit
3044443bf1
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user