Skip to content

Commit 1772f46

Browse files
authored
refactor: simplify boolean expression
1 parent 31ec98d commit 1772f46

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/Homepage/LanguageMorpher.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ const LanguageMorpher = () => {
4141

4242
// Use fallback value during SSR to prevent hydration mismatch
4343
// Default to false (mobile) during SSR, then use actual value on client
44-
const isLargeScreen = isClient ? isLarge : false
44+
const isLargeScreen = isClient && isLarge
4545

4646
return (
4747
<Button

src/components/Nav/Client/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const ClientSideNav = () => {
9494

9595
// Use fallback value during SSR to prevent hydration mismatch
9696
// Default to false (mobile) during SSR, then use actual value on client
97-
const desktopScreen = isClient ? desktopScreenValue : false
97+
const desktopScreen = isClient && desktopScreenValue
9898

9999
return (
100100
<>

0 commit comments

Comments
 (0)