Skip to content

Commit 1ee3104

Browse files
committed
fix(web): fix hydration error
closed COD-336
1 parent d0e7ede commit 1ee3104

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

apps/web/app/routes/resources.theme-switch.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export function ThemeSwitch({
8181
className="group bg-core-action-btn-background shadow-core-action-btn-shadow ring-core-action-btn-border hover:ring-core-action-btn-border-hover rounded-full px-3 py-2 shadow-lg ring-1 backdrop-blur transition"
8282
>
8383
{icon}
84+
<span className="sr-only capitalize">{mode}</span>
8485
</button>
8586
</div>
8687
</fetcher.Form>
@@ -149,8 +150,6 @@ function getThemeIcon(mode: Theme | 'system'): React.ReactElement {
149150
mode === 'dark'
150151
}
151152
)}
152-
>
153-
<span className="sr-only capitalize">{mode}</span>
154-
</Icon>
153+
/>
155154
);
156155
}

0 commit comments

Comments
 (0)