From 0a16c5329d696b4fe7fae5b8564b9fceb00d472c Mon Sep 17 00:00:00 2001 From: Mina Choi Date: Mon, 19 Oct 2026 16:25:48 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=A7=80=EC=97=AD=20=EB=B0=94=EA=BE=B8?= =?UTF-8?q?=EA=B8=B0=20=EB=AA=A9=EB=A1=9D=EC=9D=84=20=EC=A7=80=EC=97=AD=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=A7=81=ED=81=AC(a=20href)?= =?UTF-8?q?=EB=A1=9C,=20=EC=8B=9C=ED=8A=B8=EA=B0=80=20=EB=8B=AB=ED=98=80?= =?UTF-8?q?=20=EC=9E=88=EC=96=B4=EB=8F=84=20=EC=A7=80=EC=97=AD=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20=EB=A7=81=ED=81=AC=EB=A5=BC=20HTML?= =?UTF-8?q?=EC=97=90=20=EB=91=94=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/b/Sheets.tsx | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/frontend/src/b/Sheets.tsx b/frontend/src/b/Sheets.tsx index 530dd3f..71ddd00 100644 --- a/frontend/src/b/Sheets.tsx +++ b/frontend/src/b/Sheets.tsx @@ -1,5 +1,6 @@ import { useInfiniteQuery, useMutation, useQuery, useQueryClient, type InfiniteData } from '@tanstack/react-query' import { useCallback, useDeferredValue, useEffect, useMemo, useRef, useState, type FormEvent, type ReactNode } from 'react' +import regionPages from '../../seo/region.json' import { setTokens, subscribeAuth } from '../api/auth' import { SITE_URL } from '../api/setup' import { @@ -133,6 +134,7 @@ function SheetHost({ state, onClose }: { state: SheetState; onClose: () => void {state.type === 'region' && } )} + {!state && } ) } @@ -987,6 +989,27 @@ function MeSheet({ onDone }: { onDone: () => void }) { /* ---------- 지역 ---------- */ const LOCATE_TEXT = { idle: '', locating: '위치를 찾는 중이에요…', denied: '위치 권한이 꺼져 있어요. 아래 목록에서 골라 주세요.', error: '위치를 찾지 못했어요. 아래 목록에서 골라 주세요.' } as const +/** 구 코드 → 그 구가 속한 지역 페이지 주소 */ +const pageHref = (code: string) => { + const p = regionPages.find((g) => g.regions.some((r) => r.code === code)) + return p ? `/today/${p.path}` : '/' +} + +/** 지역 바꾸기가 닫혀 있을 때도 지역 페이지 링크를 HTML에 둔다 (검색 로봇이 링크를 따라가게) */ +function RegionLinks() { + return ( + + ) +} + function RegionSheet({ onDone }: { onDone: () => void }) { const { region, setRegion, locate, locateStatus } = useRegion() const { me, logout } = useAuth() @@ -1018,10 +1041,11 @@ function RegionSheet({ onDone }: { onDone: () => void }) {
    {regions.map((r) => (
  • - +
  • ))}