fix: 홈 waveform SVG hydration mismatch + smooth scroll 경고

- Math.sin 부동소수점 값을 toFixed(3)로 정규화 (서버/클라 직렬화 차이 제거)
- html에 data-scroll-behavior="smooth" 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-15 02:27:44 +09:00
parent 6d0c3c4bcf
commit 97851e68a0
2 changed files with 6 additions and 6 deletions

View File

@@ -101,7 +101,7 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
<html lang="ko" className={`${spaceGrotesk.variable} ${inter.variable} ${manrope.variable}`}>
<html lang="ko" data-scroll-behavior="smooth" className={`${spaceGrotesk.variable} ${inter.variable} ${manrope.variable}`}>
<head>
<script
type="application/ld+json"

View File

@@ -115,11 +115,11 @@ export default function Home() {
<rect
key={i}
x={i * 30 + 10}
y={250 - Math.abs(Math.sin(i * 0.6) * 120)}
y={Number((250 - Math.abs(Math.sin(i * 0.6) * 120)).toFixed(3))}
width="10"
height={Math.abs(Math.sin(i * 0.6) * 240) + 20}
height={Number((Math.abs(Math.sin(i * 0.6) * 240) + 20).toFixed(3))}
fill="url(#wg)"
opacity={0.4 + Math.sin(i * 0.3) * 0.3}
opacity={Number((0.4 + Math.sin(i * 0.3) * 0.3).toFixed(3))}
/>
))}
</svg>
@@ -177,9 +177,9 @@ export default function Home() {
<rect
key={j}
x={j * 14 + 8}
y={100 - Math.abs(Math.sin((j + i * 5) * 0.5) * 60)}
y={Number((100 - Math.abs(Math.sin((j + i * 5) * 0.5) * 60)).toFixed(3))}
width="6"
height={Math.abs(Math.sin((j + i * 5) * 0.5) * 120) + 10}
height={Number((Math.abs(Math.sin((j + i * 5) * 0.5) * 120) + 10).toFixed(3))}
fill="white"
opacity={0.4}
/>