diff --git a/src/layouts/TheTop.vue b/src/layouts/TheTop.vue index 42ebb3f..e4b7cf6 100644 --- a/src/layouts/TheTop.vue +++ b/src/layouts/TheTop.vue @@ -368,11 +368,15 @@ const weatherKorean = computed(() => weather.value.description || '날씨 정보 없음'); onMounted(() => { + + if (!userStore.user) return; + navigator.geolocation.getCurrentPosition(async (position) => { const lat = position.coords.latitude; const lon = position.coords.longitude; try { + await userStore.userInfo(); const res = await axios.get(`/weather`, { params: { lat, lon }, withCredentials: true,