fix: 로그인 창에 남은 '또는 아이디로' 구분선과 '아이디로 로그인해 주세요' 안내 빼기, 빈 오류 칸 여백 줄이기

This commit is contained in:
minaChoi committed 2026-10-21 17:24:02 +09:00
1 parent cc06d1fa6d
commit aef8b4a022
10 files changed
+86 -21

No files matched your search

+6 -4
View File
@@ -10,9 +10,9 @@ const KEY = 'nalssigak.b.region'
type RegionPage = (typeof regionPages)[number]
/** /today/gyeonggi/seongnam, /today/gyeonggi/seongnam/bundang 같은 지역 페이지 주소면 그 페이지 */
/** /today/gyeonggi/seongnam, /tomorrow/gyeonggi/seongnam/bundang 같은 지역 페이지 주소면 그 페이지 */
function pageOf(pathname: string): RegionPage | undefined {
const path = pathname.match(/^\/today\/([a-z]+\/[a-z]+(?:\/[a-z]+)?)\/?$/)?.[1]
const path = pathname.match(/^\/(?:today|tomorrow)\/([a-z]+\/[a-z]+(?:\/[a-z]+)?)\/?$/)?.[1]
return path ? regionPages.find((p) => p.path === path) : undefined
}
@@ -45,9 +45,11 @@ export function RegionProvider({ children }: { children: ReactNode }) {
const navigate = useNavigate()
const page = pageOf(pathname)
const pageRef = useRef(page)
const dayRef = useRef(pathname.startsWith('/tomorrow/') ? 'tomorrow' : 'today')
useEffect(() => {
pageRef.current = page
}, [page])
dayRef.current = pathname.startsWith('/tomorrow/') ? 'tomorrow' : 'today'
}, [page, pathname])
const [stored] = useState(readStored)
const [landing] = useState(page)
const [chosen, setRegionState] = useState<RegionData>(() => (page ? regionIn(page, stored) : (stored ?? DEFAULT_REGION)))
@@ -61,7 +63,7 @@ export function RegionProvider({ children }: { children: ReactNode }) {
setRegionState(r)
writeStored(r)
const next = ownPage(r.code)
if (pageRef.current && next && next !== pageRef.current) navigate(`/today/${next.path}`)
if (pageRef.current && next && next !== pageRef.current) navigate(`/${dayRef.current}/${next.path}`)
}, [navigate])
// quiet 면 못 찾아도 상태를 바꾸지 않는다 (사람이 누른 게 아니라 안내 문구를 띄우지 않음)