diff --git a/layers/components/layouts/Header.vue b/layers/components/layouts/Header.vue index 01dc933..afa1d77 100644 --- a/layers/components/layouts/Header.vue +++ b/layers/components/layouts/Header.vue @@ -20,7 +20,7 @@ const scrollStore = useScrollStore() const breakpoints = useResponsiveBreakpoints() const { sendLog } = useAnalytics() -const { gameData } = storeToRefs(gameDataStore) +const { gameName, imgJson, gnb, eventBanner } = storeToRefs(gameDataStore) const { pageLayoutType } = storeToRefs(pageDataStore) const { isPassedStoveGnb } = storeToRefs(scrollStore) @@ -35,18 +35,18 @@ const navWidth = ref(0) const officialItemWidths = ref([]) const overflowCount = ref(0) -const gnbData = computed(() => gameData.value?.gnb) +const biSmallPath = computed(() => imgJson.value?.bi_small) const gnbMenusCount = computed(() => { - const menus = gnbData.value?.menus + const menus = gnb.value?.menus if (!menus || typeof menus !== 'object') return 0 return Object.keys(menus).length }) const currentPath = computed(() => formatPathWithoutLocale(route.path)) const start1depthData = computed( - () => gnbData.value?.buttons[0]?.button_json as GameDataResourceGroup + () => gnb.value?.buttons[0]?.button_json as GameDataResourceGroup ) const start2depthData = computed( - () => gnbData.value?.buttons[1]?.button_json as GameDataResourceGroupSet + () => gnb.value?.buttons[1]?.button_json as GameDataResourceGroupSet ) // 자식 중 활성 링크 존재 여부 확인 @@ -60,7 +60,7 @@ const hasActiveChild = (children?: GameDataMenuChildren) => { // navAreaRef의 넓이를 구하는 함수 const calculateNavWidth = () => { if (!import.meta.client) return - if (!navAreaRef.value || !gnbData.value) return 0 + if (!navAreaRef.value || !gnb.value) return 0 const navAreaWidth = navAreaRef.value.offsetWidth navWidth.value = navAreaWidth + MORE_WIDTH @@ -179,20 +179,17 @@ onMounted(() => {