fix: QA 버그 5건 수정 — 뒤로 가기로 시트 닫기, 로그인 후 댓글 복귀, 터치 영역 44px, 순위 대기 칩 비활성, 위치 찾기 후 지역 시트 닫기

This commit is contained in:
minaChoi committed 2026-10-08 09:18:05 +09:00
1 parent 471353212a
commit f1846ddf66
8 files changed
+72 -33

No files matched your search

+4 -3
View File
@@ -35,7 +35,7 @@ export function RegionProvider({ children }: { children: ReactNode }) {
writeStored(r)
}, [])
const findNearest = useCallback(() => {
const findNearest = useCallback((onFound?: () => void) => {
navigator.geolocation.getCurrentPosition(
(pos) => {
nearestRegion({ query: { lat: pos.coords.latitude, lon: pos.coords.longitude } })
@@ -43,6 +43,7 @@ export function RegionProvider({ children }: { children: ReactNode }) {
if (!res.region) throw new Error('가까운 구를 찾지 못함')
setRegion(res.region)
setLocateStatus('idle')
onFound?.()
})
.catch(() => setLocateStatus('error'))
},
@@ -51,13 +52,13 @@ export function RegionProvider({ children }: { children: ReactNode }) {
)
}, [setRegion])
const locate = useCallback(() => {
const locate = useCallback((onFound?: () => void) => {
if (!canLocate) {
setLocateStatus('error')
return
}
setLocateStatus('locating')
findNearest()
findNearest(onFound)
}, [canLocate, findNearest])
// 처음 온 사람만 위치 권한을 물어 가장 가까운 구로 맞춘다