fix. 하이드레이션 에러 수정

This commit is contained in:
clkim
2025-11-13 17:18:44 +09:00
parent 56a2334055
commit 0d9b5dd7ad
8 changed files with 35 additions and 68 deletions

View File

@@ -63,13 +63,11 @@ const hasActiveChild = (children?: GameDataMenuChildren) => {
const isNavItemActive = (gnbItem: GameDataMenu): boolean => {
const cur = currentPath.value
const base = gnbItem?.url_path
if (import.meta.client) {
const selfActive =
!!base &&
isInternalUrl(base) &&
pathMatches(formatPathWithoutLocale(base), cur)
return selfActive || hasActiveChild(gnbItem.children)
}
const selfActive =
!!base &&
isInternalUrl(base) &&
pathMatches(formatPathWithoutLocale(base), cur)
return selfActive || hasActiveChild(gnbItem.children)
}
// navAreaRef의 넓이를 구하는 함수