Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthrough가게 검색 응답에서 latitude/longitude(lat/lng) 필드를 수신해 이를 location으로 매핑하도록 ApiStoreSummary 타입과 toSummary 변환 로직을 확장했습니다. distanceKm/thumbnailUrl 필드명은 distance/mainImageUrl로 매핑되며, RestaurantSummary.location은 선택적(optional)으로 변경되었습니다. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
리뷰 포인트(간단 권고)
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/pages/SearchPage.tsx (2)
187-214:⚠️ Potential issue | 🟠 Major
useEffect에서geoMap의존성 누락 +cancelled미확인 + 무한 재시도 위험 🔴세 가지 문제가 있어요:
1.
geoMapstale closure (코딩 가이드라인: 의존성 배열 정확성)
Line 201의new Map(geoMap)은 deps에 없는geoMap을 읽어요. 결과가 바뀔 때 이전 렌더의 Map 스냅샷을 참조하게 되지만,geoMap을 deps에 추가하면setGeoMap→ effect 재실행 →setGeoMap무한 루프가 생겨요. 해결책은 함수형 업데이터(setGeoMap(prev => ...))를 사용해 effect 안에서geoMap을 직접 읽지 않는 것이에요.2.
cancelled플래그 미확인
Line 212에서 cleanup이cancelled = true로 설정하지만,run()안의 async 루프 어디서도 확인하지 않아요.results가 바뀌거나 컴포넌트가 unmount되어도setGeoMap이 실행되어 의도치 않은 상태 업데이트가 발생해요.3. 무한 재시도 위험
kakao.maps.services가 끝내 로드되지 않으면 200ms마다run()을 재귀 호출하는 루프가 무한히 돌아요.♻️ 수정 제안
useEffect(() => { let cancelled = false; + let retryCount = 0; + const MAX_RETRIES = 15; + const run = async () => { if (!results || results.length === 0) return; const kakao = window.kakao; if (!kakao?.maps?.services) { - setTimeout(() => { - if (!cancelled) run(); - }, 200); + if (retryCount++ < MAX_RETRIES) { + setTimeout(() => { if (!cancelled) run(); }, 200); + } return; } const targets = results.filter((r) => !isValidLatLng(r.location)); if (targets.length === 0) return; - const next = new Map(geoMap); - for (const r of targets) { - if (next.has(r.id)) continue; - const loc = await geocodeAddress(r.address); - if (loc) next.set(r.id, loc); - } - setGeoMap(next); + const entries: [number, LatLng][] = []; + for (const r of targets) { + if (cancelled) return; + const loc = await geocodeAddress(r.address); + if (loc) entries.push([r.id, loc]); + } + if (!cancelled && entries.length > 0) { + setGeoMap((prev) => { + const next = new Map(prev); + for (const [id, loc] of entries) { + if (!next.has(id)) next.set(id, loc); + } + return next; + }); + } }; run(); return () => { cancelled = true; }; }, [results]);As per coding guidelines: 의존성 배열(useEffect) 정확성 규칙에 따라 effect 내부에서 읽는 모든 상태는 의존성 배열에 포함하거나, 함수형 업데이터로 우회해야 해요.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/pages/SearchPage.tsx` around lines 187 - 214, The effect currently reads geoMap from closure and retries indefinitely without checking cancellation; change run() to use setGeoMap(prev => { const next = new Map(prev); ... return next; }) so you never reference geoMap directly, check the cancelled flag immediately after any await (and before calling setGeoMap) to avoid state updates after unmount, and replace the unbounded setTimeout retry for kakao.maps.services with a bounded retry strategy (e.g., count retries or a timeout window) and clear any scheduled retry in the cleanup; reference useEffect, run, setGeoMap, geocodeAddress, cancelled, and kakao.maps.services when making these changes.
304-307:⚠️ Potential issue | 🟠 Major지도와 목록이 다른 데이터를 사용해서 UX 불일치가 생기고 있어요
확인해보니 실제로 문제가 있네요:
geocodedResults는results에서 유효한 좌표가 있는 항목만 필터링해서 지도에 표시 (line 222의.filter(Boolean))RestaurantList는 좌표 없는 항목까지 포함한 전체results를 받아서 렌더링RestaurantCard가location필드를 사용하지 않으니 좌표 없는 가게도 목록에 보임결과: 사용자가 목록에서 가게를 보고 선택해도 지도에는 없는 상황이 발생합니다.
권장:
- 의도적인 설계라면 왜 다른 데이터를 사용하는지 명시하는 주석 추가
- 또는
RestaurantList도geocodedResults를 받도록 통일해서 목록과 지도의 데이터 일관성 보장🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/pages/SearchPage.tsx` around lines 304 - 307, The list and map are using different datasets causing UX mismatch: geocodedResults (filtered via .filter(Boolean)) is used for the map while RestaurantList is fed the unfiltered results, so entries without coordinates appear in the list but not on the map; update the JSX to pass geocodedResults to <RestaurantList> (and ensure its props and any usages in RestaurantCard/handleSelectStore still work with that shape), or if the divergence is intentional add a clear comment in SearchPage explaining why results vs. geocodedResults differ and where RestaurantList/RestaurantCard should accept items without location.
🧹 Nitpick comments (2)
src/hooks/store/useSearchStores.ts (1)
10-10:Params.category에Category타입 직접 사용을 권장해요이미
Category를 임포트했는데,Params안에서 동일한 리터럴 유니언을 중복 정의하고 있어요. 새 카테고리가 추가되면 두 곳을 각각 수정해야 하는 불편함이 생깁니다.♻️ 수정 제안
- category?: "KOREAN" | "CHINESE" | "JAPANESE" | "WESTERN" | "CAFE"; + category?: Category;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/hooks/store/useSearchStores.ts` at line 10, Params currently declares category as a hardcoded literal union; switch it to use the existing imported Category type instead: update the Params type definition so its category property is typed as Category (e.g., category?: Category) to avoid duplicating the union and ensure future category additions only require updating the single Category declaration.src/pages/SearchPage.tsx (1)
33-34:FALLBACK_COORDS와LatLng타입을 컴포넌트 밖으로 꺼내는 것을 권장해요
FALLBACK_COORDS는 렌더마다 새 객체로 재생성되고,LatLng타입(line 73)도 컴포넌트 안에서 선언할 필요가 없어요. 모듈 최상위로 이동하면 의도가 더 명확해지고 잠재적인 참조 동치 이슈도 예방할 수 있어요.♻️ 수정 제안
+type LatLng = { lat: number; lng: number }; +const FALLBACK_COORDS: LatLng = { lat: 37.5665, lng: 126.978 }; export default function SearchPage() { // ... - const FALLBACK_COORDS = { lat: 37.5665, lng: 126.978 }; // ... - type LatLng = { lat: number; lng: number }; const [geoMap, setGeoMap] = useState<Map<number, LatLng>>(new Map());🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/pages/SearchPage.tsx` around lines 33 - 34, Move the FALLBACK_COORDS constant and the LatLng type out of the SearchPage component to the module top-level so they are not recreated on every render; update the component to import/use the top-level FALLBACK_COORDS for the initial useState call (mapCenter, setMapCenter) and reference the top-level LatLng type where currently declared inside the component. Ensure the exported/declared names remain FALLBACK_COORDS and LatLng so existing usages (useState(FALLBACK_COORDS), mapCenter typing) continue to work and remove the in-component declarations.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/hooks/store/useSearchStores.ts`:
- Around line 51-54: toNum currently treats null as 0 because Number(null) ===
0; change toNum so it returns undefined for null and empty/non-numeric values
instead of coercing them to 0: explicitly check for v === null and v ===
undefined (and for strings, trim and ensure they are non-empty and parseFloat
yields a finite number) and only then return a finite number, otherwise return
undefined; update the toNum function used for converting s.latitude/s.lat to
ensure invalid inputs don't produce 0 coordinates.
---
Outside diff comments:
In `@src/pages/SearchPage.tsx`:
- Around line 187-214: The effect currently reads geoMap from closure and
retries indefinitely without checking cancellation; change run() to use
setGeoMap(prev => { const next = new Map(prev); ... return next; }) so you never
reference geoMap directly, check the cancelled flag immediately after any await
(and before calling setGeoMap) to avoid state updates after unmount, and replace
the unbounded setTimeout retry for kakao.maps.services with a bounded retry
strategy (e.g., count retries or a timeout window) and clear any scheduled retry
in the cleanup; reference useEffect, run, setGeoMap, geocodeAddress, cancelled,
and kakao.maps.services when making these changes.
- Around line 304-307: The list and map are using different datasets causing UX
mismatch: geocodedResults (filtered via .filter(Boolean)) is used for the map
while RestaurantList is fed the unfiltered results, so entries without
coordinates appear in the list but not on the map; update the JSX to pass
geocodedResults to <RestaurantList> (and ensure its props and any usages in
RestaurantCard/handleSelectStore still work with that shape), or if the
divergence is intentional add a clear comment in SearchPage explaining why
results vs. geocodedResults differ and where RestaurantList/RestaurantCard
should accept items without location.
---
Nitpick comments:
In `@src/hooks/store/useSearchStores.ts`:
- Line 10: Params currently declares category as a hardcoded literal union;
switch it to use the existing imported Category type instead: update the Params
type definition so its category property is typed as Category (e.g., category?:
Category) to avoid duplicating the union and ensure future category additions
only require updating the single Category declaration.
In `@src/pages/SearchPage.tsx`:
- Around line 33-34: Move the FALLBACK_COORDS constant and the LatLng type out
of the SearchPage component to the module top-level so they are not recreated on
every render; update the component to import/use the top-level FALLBACK_COORDS
for the initial useState call (mapCenter, setMapCenter) and reference the
top-level LatLng type where currently declared inside the component. Ensure the
exported/declared names remain FALLBACK_COORDS and LatLng so existing usages
(useState(FALLBACK_COORDS), mapCenter typing) continue to work and remove the
in-component declarations.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/components/map/KakaoMap.tsx (1)
38-41:⚠️ Potential issue | 🟡 Minor
toNum(null)이0을 반환해 마커가 엉뚱한 곳(위경도 0,0)에 찍힐 수 있어요
typeof null === "object"이므로Number(null) === 0,Number.isFinite(0) === true→toNum(null)은null이 아닌0을 반환합니다. 결과적으로 API가{ lat: null, lng: null }을 내려주면normalizeLatLng이null대신{ lat: 0, lng: 0 }(기니만 앞바다)을 반환하고, 해당 마커가 지도에 잘못 표시됩니다.undefined는Number(undefined) === NaN이라 올바르게 처리되는데null만 구멍이 납니다.🐛 `null` 조기 반환 추가 제안
const toNum = (v: unknown) => { + if (v === null || v === undefined) return null; const n = typeof v === "string" ? parseFloat(v) : Number(v); return Number.isFinite(n) ? n : null; };🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/map/KakaoMap.tsx` around lines 38 - 41, The toNum helper incorrectly converts null to 0 because typeof null === "object"; update toNum (used by normalizeLatLng) to early-return null when the input is exactly null (check v === null) before calling typeof/Number parsing, so that null coordinates stay null and don't become { lat: 0, lng: 0 } on the map; keep the existing string/Number parsing for other cases and maintain Number.isFinite check to return null for non-finite results.
🧹 Nitpick comments (1)
src/components/map/KakaoMap.tsx (1)
60-68:normalizeLatLng가useMemo의존성 배열에 없고,(m as any)캐스트도 불필요해요두 가지 포인트입니다:
누락된 deps:
normalizeLatLng는 컴포넌트 안에서 정의되었지만useMemo의 의존성 배열([markers])에 빠져 있어,react-hooks/exhaustive-deps경고("stale closures where the hook uses outdated values")가 발생합니다.toNum과normalizeLatLng는 reactive 값에 의존하지 않는 순수 함수이므로 컴포넌트 외부로 꺼내면 deps 문제와 매 렌더마다 함수 재생성 문제를 한 번에 해결할 수 있어요.불필요한
as any:normalizeLatLng시그니처가 이미(loc: any)이므로m.location(Location | undefined)을 바로 넘겨도 TypeScript가 허용합니다.(m as any).location은 오히려m전체에 대한 타입 검사를 우회시키는 사이드 이펙트가 있어요.♻️ 순수 함수 외부 이동 + 캐스트 제거 제안
+// 컴포넌트 밖 (파일 최상단 근처) +const toNum = (v: unknown): number | null => { + if (v === null || v === undefined) return null; + const n = typeof v === "string" ? parseFloat(v) : Number(v); + return Number.isFinite(n) ? n : null; +}; + +const normalizeLatLng = (loc: unknown): LatLng | null => { + if (!loc || typeof loc !== "object") return null; + const { lat: rawLat, lng: rawLng } = loc as Record<string, unknown>; + let lat = toNum(rawLat); + let lng = toNum(rawLng); + if (lat == null || lng == null) return null; + if (Math.abs(lat) > 90 && Math.abs(lng) <= 90) { + [lat, lng] = [lng, lat]; + } + if (lat < -90 || lat > 90 || lng < -180 || lng > 180) return null; + return { lat, lng }; +}; + export default function KakaoMap(...) { - const toNum = (v: unknown) => { ... }; - const normalizeLatLng = (loc: any): LatLng | null => { ... }; const safeMarkers = useMemo<MarkerWithLocation[]>(() => { return markers .map((m) => { - const norm = normalizeLatLng((m as any).location); + const norm = normalizeLatLng(m.location); if (!norm) return null; return { ...m, location: norm } as MarkerWithLocation; }) .filter(Boolean) as MarkerWithLocation[]; }, [markers]);🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/map/KakaoMap.tsx` around lines 60 - 68, safeMarkers' useMemo uses normalizeLatLng but doesn't include it in deps and also uses an unnecessary cast (m as any); move the pure helper functions toNum and normalizeLatLng out of the component so they are stable (or alternatively add normalizeLatLng to the useMemo deps), and remove the (m as any) cast by passing m.location directly to normalizeLatLng and returning the typed MarkerWithLocation; update useMemo to depend on markers (and normalizeLatLng only if you don't move it).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/components/map/KakaoMap.tsx`:
- Line 6: Fix the toNum/null handling and accessibility: update the toNum
function so it explicitly returns null for null/undefined inputs (do not convert
null to 0) and ensure normalizeLatLng treats null as invalid (so coordinates
with null are rejected instead of becoming 0,0); move both toNum and
normalizeLatLng out of the KakaoMap component to avoid useMemo dependency
warnings (referencing toNum, normalizeLatLng, useMemo, MarkerWithLocation,
containerRef to find locations); finally add role="region" and an appropriate
aria-label (e.g. "레스토랑 위치 지도") to the map container div referenced by
containerRef to improve accessibility.
---
Outside diff comments:
In `@src/components/map/KakaoMap.tsx`:
- Around line 38-41: The toNum helper incorrectly converts null to 0 because
typeof null === "object"; update toNum (used by normalizeLatLng) to early-return
null when the input is exactly null (check v === null) before calling
typeof/Number parsing, so that null coordinates stay null and don't become {
lat: 0, lng: 0 } on the map; keep the existing string/Number parsing for other
cases and maintain Number.isFinite check to return null for non-finite results.
---
Nitpick comments:
In `@src/components/map/KakaoMap.tsx`:
- Around line 60-68: safeMarkers' useMemo uses normalizeLatLng but doesn't
include it in deps and also uses an unnecessary cast (m as any); move the pure
helper functions toNum and normalizeLatLng out of the component so they are
stable (or alternatively add normalizeLatLng to the useMemo deps), and remove
the (m as any) cast by passing m.location directly to normalizeLatLng and
returning the typed MarkerWithLocation; update useMemo to depend on markers (and
normalizeLatLng only if you don't move it).
…트 외부로 이동, 지도컨테이너 접근성 개선
* docs: add issue template (#3) * docs: add PR template (#4) PR 템플릿 추가 * feat: 식당검색/조회 UI구현 (#8) * feat: 식당검색/조회 UI구현 * feat: 지도 영역 위에 마커 표시 추가, 검색 결과리스트 UI수정, mock데이터추가및수정 * feat: 로그인/회원가입 UI 및 입력 폼 구현 * chore: 사용하지 않는 Form 컴포넌트 삭제 * style: 체크박스, 회원가입/로그인 이동 버튼, 닫기 버튼 UX 개선 * chore: add shadcn ui components (popover, calendar) and update separator,button (#12) 공용 컴포넌트 추가 및 수정 * chore: add shadcn ui components (popover/calendar) (#13) * chore: add shadcn ui components (popover, calendar) and update separator,button * chore: add shadcn ui components (popover, calendar, separator) and deps * feat: mypage UI 구현(내 정보, 계정 설정, 결제수단, 구독 관리, 예약 현황, 내 가게 관리) * feat: 고객센터 페이지 레이아웃 및 히어로 섹션(문의 모달) 구현 * feat: 메인 FAQ 섹션 구현 * style: 히어로 섹션 텍스트 줄바꿈(break-keep) 적용 * style: 페이지 레이아웃 간격 수정, 문의하기 폼 텍스트 속성(break-keep) 추가 * feat: 문의처 정보 섹션 구현 * feat: 식당예약 UI구현 (#17) * wip: reservePage * wip: reservation modal skeleton * wip: reserve page * feat:reserveConfirmModal * feat:예약 확정 모달 추가 * chore:한국날짜 기준 지난 날짜는 선택불가 기능 추가 * feat:예약금결제모달 구조 UI구현 * style: 예약금 선결제 모달 디자인 구현 * feat:예약시 좌석배치도 추가 * feat:테이블 배치도 기능 구현완료 * feat: 식당id에 따라 존재하지 않는 좌석유형 클릭불가 기능 추가, 흐림처리 추가 * chore: 해당없는 좌석유형 숨김, 예약확인모달- 수정하기 버튼클릭시 기존 선택값유지되도록 설정, 결제수단 버튼 기본값 삭제, style: ReservationConfirmModal.tsx height max 설정 * chore: 결제하기 모달 이탈방지 알림 추가, 다른 예약모달과 코드 동일한 루틴으로 변경 * chore: 예약확정모달에서 테이블번호 추가 * feat: 헤더에 뒤로가기(홈) 버튼 추가 * chore: 식당검색페이지 코드 개선 (#21) * chore:잇츠파인로고 파일형식 변경 * chore:식당검색 상단을 Layout으로 따로 빼고, logo 넣어서 홈으로가는 링크 추가 * docs: 로고 화질 개선 * refactor:favicon 경로수정 * chore: mypage 리뷰 반영 코드 수정 * fix: 이미지 경로 오류수정 (#23) * docs: modify PR template filename (#27) PR템플릿명 수정 * chore: add CodeRabbit config (#29) * chore: add CodeRabbit config * chore:coderabbit 말투수정 * chore: coderabbit 오타수정및 필터링에 .coderabbit.yaml추가 * feat: 메인페이지 UI구현 (#25) * wip: main page header * feat:mainPage 기본 UI 구현완료 * chore: header부분 Hero.tsx지나서 scrolled 적용되도록 기능 구현 * chore: 스크롤시 떠오르는 효과 구현 * chore: Button에 nav기능추가 * chore: header부분 mobile크기로 변경시 햄버거 나오도록 구현, ForOwnerSection 모바일크기 맞춰서 나오도록 수정 * chore: 오타및 공백수정 * chore: footer 섹션에 max너비 추가 * chore: Header 모바일메뉴 열렸을때, 버튼 크기/폰트 크기/배경색 수정 * chore:영상 스크린 리더 불필요한 읽힘제거 * chore:불필요한 코드 제거 * chore: Feature 카드 컴포넌트 분리 * chore:Header 모바일 변하는 시점 수정 및 모바일에서 길어짐현상 제거 * chore: Join대신 cn으로 통일 * chore: 모바일 화면에서 줄바꿈 자연스럽도록 수정 * chore: header 수정 * chore: 배경용 iframe에 키보드 포커스 제거 * chore: useInView 수정 * chore: 적용되지않는 tailwind 클래스 수정, 주석 수정 * chore: CtaSection.tsx 불필요한/적용안되는 코드 삭제및수정 * refactor: 코드 가독성을 높이기 위한 수정진행 * feat: 새 가게 등록 1단계(사업자 인증) UI 구현 * feat: 새 가게 등록 2단계(가게 정보) UI 구현 및 페이지 경로를 myPage 하위로 이동 * feat: 새 가게 등록 3단계(메뉴 등록) UI 구현 * style: cursor-pointer 추가, 단계별 연결선 스타일 개선, 하단 버튼 여백 개선 * fix: 이미지 메모리 누수, 가격 변환 로직, 폼 접근성 이슈 수정 * feat: 가게 등록 이탈/완료 모달 구현 및 사업자 인증 UX 개선 * feat: phoneNumber 유틸 함수 추가, 가게 정보 폼 적용 * feat: 정기 휴무일 선택 UI 및 스키마 추가 * feat: 예약 정책 UI 및 스키마 추가 * refactor: type=button 지정, aria-label 및 invalid 추가, Label 컴포넌트 적용, console.log 삭제 * fix: 비동기 언마운트 버그 수정, 접근성 개선 * chore: global 스타일 적용 (#33) * chore: 글로벌 style 세팅(shadcn테마, 폰트, 토큰, 기본 타이포세팅) * chore: cn 유틸리티를 lib/utils로 통일 * chore: axios 인스턴스 및 요청/응답 인터셉터 설정 * chore: Tanstack Query QueryClient 전역 설정 추가 * chore: API연동 대비 query key관리(keys.ts)추가, 폴더구조 정리 * fix:QueryClientProvider 중복 제거후, queryClient 단일화 * chore:border 중복스타일 제거 * chore: 스위치 버튼에 포커스표시와 ARIA 속성 추가로 접근성 개선 * fix:타이포 기본 적용 조건 수정 * chore: global.css 수정 * chore: owner 쿼리키에 중간키 추가 * chore: 쿼리 키에 넣을 params를 직렬화 가능한 타입으로 제한 * feat: 메뉴/예약금 type 및 mock데이터/hooks 추가 (#35) * feat:내가게관리 UI 구현 * feat: 예약중 메뉴선택 UI추가 (#39) * chore: 예약금정책 변경에 따른 코드수정 * feat: 메뉴선택 UI로 이동 구현 * feat: 예약시 메뉴선택 UI모달추가 및 예약금을 메뉴총액대비 예약금률 적용하도록 수정 * chore: hooks 호출 순서 꺠뜨리는 조건부 return 수정, draft 변경시 selectedMenus 상태 동기화누락 수정, aria-label 수정 * chore:오타수정, open prop에 따른 조건부 랜덜이 누락 * chore: 메뉴 최대수량일때 증가버튼 비활성화되도록 기능추가 * style: 너비/패딩 수정 * style: 메뉴선택모달하단부분 예약금 블루색깔추가, 메뉴총액은 가로로 위치변경 * chore: 모바일 너비처리를 위한 코드추가(이전 작업범위) * chore: 메뉴선택에서 우측상단 X 아이콘은 모달닫기로 수정, 하단에 다음버튼 왼쪽에 이전으로 이동하는 버튼추가 * chore: 식당예약모달에서 우측상단 X아이콘 모달닫기로 수정 * chore: 예약모든 모달 X아이콘 클리시 창닫기로 모드수정, 창닫기알림창 훅 새로 생성해서 모든 모달에 적용 * refactore:주석삭제 * chore: 모달이외지역클릭시 닫기 -> hooks사용으로 변경 * chore:예약금 표시비율 통일 * chore: axios 기본 세팅, 인증/에러 처리 인프라 구축 * refactor: 타입 단언을 타입 가드로 교체 * fix: 콘솔 로그의 오해 소지가 있는 변수명 수정 * [chore]내 가게 관리 리뷰 반영 수정 * chore: 내 가게 관리 리뷰 반영 수정2 * chore:대시보드 추가 수정 밑 버튼 이동 경로 설정 * feat:notFoundPage UI 구현 * style: notFoundPage 버튼, 이모지 스타일 변경 * chore: 내 가게 관리 coderabbit 반영 수정 * chore: notFoundPage coderabbit 반영 수정 * chore:내 가게 관리 coderabbit 반영 수정 2 * fix: 마이페이지 동작 버그 수정 및 내정보 편집 UX 개선 (#43) * fix:마이페이지에서 뒤로가기 작동되도록 수정 * chore: 마이페이지 상단에 제목 선택시 홈으로 가도록 기능 추가 * style: 마이페이지 안 내정보 부분 디자인 수정 * fix: 전화번호에 number타입만 사용되도록 phoneNumber함수사용 * fix: 내정보 수정가능한 정보들 취소 누를시 원상복구가능하도록 기능 추가 * fix: 이미지 file기반으로 전환 * style: 마이페이지 내에 settingPage 스타일수정 * style: myInfoPage 내에 text-md 제거 * style: 마이페이지 스타일통일 및 text위치통일 * chore: 내 가게 관리 리뷰 반영 수정 및 마이페이지 연결 (+마이페이지 수정) * chore: 내 가게 관리 coderabbit 반영 수정3 * chore: 내 가게 관리 휴무일 반영 수정 및 리뷰 반영 수정 * [chore]메인화면 내 가게 관리 연결 * chore: 오류페이지 리뷰 반영 수정 * chore: 내가게관리 메뉴관리 수정 * feat : 카카오맵 연동 및 검색 결과 마커 자동으로 이동되도록 구현 (#48) * refactor: 식당 Summary/Detail 타입 및 DTO/어뎁터 추가 * refactor: 식당 mock을 검색용(Summary)와 상세정보용(Detail)로 분리 * feat: 식당 상세 모달에서 로딩/에러 상태 및 재시도 흐름 추가 * feat: 카카오맵 SDK 로드 및 SearchPage 지도 랜더링 연결 * refactor: 모달 닫기와 전체 초기화 로직 분리 * feat: 지도 중심 이동 및 선택 상태 유지 * feat: 카카오맵 bounds 자동 조정 및 선택 이동 UX 개선 * fix: 코드래빗 피드백 수정, SDK 로드 분리 * chore: 상태변수이용해서 SDK 로딩완료추척 * fix: SDK 참조 오류 수정 * refactor: 스크린리더 정보 추가 * chore: SDK 로딩 실패시 UX개선 * chore: 로고 교체 및 PublicLayout 헤더 통합 (#50) * chore:로고 변경, PublicLayout에 로그아웃 버튼추가 * refactor: PublicLayout으로 헤더 통합 및 마이페이지 레이아웃 중첩 적용 * chore: 폴더 구조정리, README 업데이트 (#52) * feat: 회원가입 Role 선택 UI 추가, 스키마 업데이트 * feat: 로그인/회원가입(이메일) API 연동, Axios 인터셉터 구현 * feat: 소셜 로그인 연동 준비 (API 및 모달 핸들러) * feat: 로그인/회원가입 모달 내 소셜 로그인(Kakao, Google) 기능 적용 * refactor: 로그인/회원가입 로직 Zustand, React Query 도입 * feat: 로그인 상태에 따른 헤더 UI 분기 처리 및 로그아웃 연동 * refactor: 인증/로그아웃 로직 개선, AI 피드백 반영 * refactor: 회원가입 역할 선택 UI 제거, role 'customer' 고정 * refactor: 로그인 UI에서 아이디/비번 찾기 제거 * fix: API 환경변수 통일, 타임아웃 설정, 에러 정규화, 카카오 키 검증 추가 * refactor: 소셜 로그인 SDK 제거 및 OAuth2 방식 전환, 콜백/에러 페이지 구현 * refactor: 소셜 로그인 리다이렉트 URL 확정 * fix: 소셜 로그인 시 서버 URL 설정 확인 로직 추가 * refactor: 회원가입/로그인 API 스펙 Swagger 기준으로 최신화 * style: 회원가입 모달 내 불필요한 약관 안내 문구 제거 * fix: API 명세 반영(isSuccess, /reissue), Refresh 로직 단순화, Auth 타입 강화 * fix: postRefresh 함수에 누락된 isSuccess 검증 로직 추가 * feat: 에러 유틸 함수 추가, 로그인/회원가입 적용 * fix: postSignup 응답 형식을 실제 API 명세에 맞춰 수정 (ApiResponse 제거) * refactor: 사업자 인증 단계 리팩토링 (스키마 분리 및 개업일자 검증 추가) * feat: 사업자 인증 API 연동 * refactor: 스웨거 맞춰 스키마, ui 수정 / 이미 인증된 사업자도 식당 등록 단계 진행되도록 개선 * refactor: 스웨거 맞춰 메뉴 등록 스키마, ui 수정 * feat: 식당 등록 API 연동, 데이터 변환 로직 구현 * feat: 내가게관리 대시보드 API 연동 (미완) * feat:내가게관리 사장 대시보드 API 연동 * fix: 변수 이름 수정 * feat: 식당 대표 이미지 등록 API 연동 * feat: 메뉴 등록 API 연동, 사장 인증 후 권한 갱신을 위한 로그아웃 로직 추가 * feat: 내가게관리 메뉴관리 API 연동 * feat : 예약 API 연동 (#55) * feat: 예약조회 API endpoints 추가 * chore: 예약 가능시간/테이블 조회 queryKey 추가 * fix: 메뉴 목록 매핑/훅 반환값 정리 및 예약금 계산 오류 수정 * chore: 예약 생성 훅 및 테이블 선택 타입 정리 복구 * 무제한 토큰 설정/예약 모달 테이블 배치도 API 연동 및 좌석 타입 매핑 추가 * fix: 좌석유형 변경시 옵션 사라지는 문제 수정 * fix: 인원/날짜/시간대 재설정시 좌석유형/테이블번호 리셋 설정 * fix: 예약 가능 테이블 조회 연동 및 좌석 없음 상태 처리 * fix: 예약 모달 storeId기반으로 바꾸고, mock 레스토랑제거 * fix: 가게 검색 리스트 API 응답 구조 반영 * fix: 가게 검색 결과 식당명 표시 오류 수정 * chore: 카카오맵 랜더링 이슈 디버깅 로그/relayout추가 (미해결) * fix: 예약확인모달에서 좌석번호 뜨도록 수정 * chore: 예약 결제 전환중 500발생(서버 zero date 의심, 문의중) * fix: 예약 생성 요청 서버 오류 해결 * fix: 예약 생성 후 결제 모달로 정상 전환되도록 booking 상태 전달 * feat: 결제 모달 이전 버튼 추가, 예약금률 서버값 연동 * chore:예약확인모달 날짜형식 서버에 문의중(미해결) * chore: API baseURL 통일 및 v1 엔드포인트 경로 정리 * chore: API baseURL 통일 및 v1 엔드포인트 경로 재정리 * feat: 토스 결제 요청/승인 플로우연동 및 성공시 이동 UX개선 * feat: 결제 실패시 사유 표시 페이지 UX 보강 * fix: 결제성공 페이지 hightlight 덮어쓰기 버그 수정및 오타수정 * feat: 결제 리다이렉트 성공/실패 처리 및 완료 UX 연결 * feat: 토스 결제 위젯 랜더링 및 결제 요청 연결 * feat: 결제 실패 페이지 UI 개선 및 에러 코드별 메세지 처리 * feat: 결제 실패 페이지 UI 개선 및 bookingId 기반 이동처리 * fix: 결제 플로우 안정화 - SuccessPage: 결제 승인(confirm) 중복 호출 방지(ranRef) - 결제 위젯 초기화/렌더링 흐름 개선 - FailPage: 쿼리 파라미터 대응/이동 처리 보완 * fix: 결제 모달 하나로 통일 * fix: 로그아웃시 userId를 null값으로 변경 * fix: 다른 페이 버튼 안눌리는 오류 수정 * fix: 코드래빗 endpoint관련 수정 * fix: 코드래빗 수정사항적용 * fix: 코드래빗 수정사항 반영 및 불필요한 코드제거 * chore: 코드래빗 수정사항 반영 * fix: 최소인원 최대인원 같은테이블은 하나로 표기하도록 수정, 불필요한 코드 및 주석 제거 * fix: 코드래빗 수정사항 반영 * chore: 코드래빗 수정사항적용(오타및 코드효율성) * fix: mock데이터 관련 타입제거 * chore: 코드래빗 수정사항 반영 * fix: member info 응답 구조에 맞게 userId 파싱 수정 및 인증 리다이렉트 버그 해결 * fix: 완료모달에서 time 이 undefined로뜨는 에러 수정(draft 타입형식오류) * chore: 카카오맵 지도오류 해결중(미해결) * fix: 식당검색시 지도 타일오류 수정 * fix: 검색 결과 주소 기반으로 지도 마커에 표시되도록 수정 * refactor: 미사용 RestaurantMarker 컴포넌트 삭제 * fix: 지도에서 마커 선택할때 해당 위치로 센터 이동 * fix: 파일 삭제 오류 재복구 * feat: 접근 제어 구현 * feat: 내가게관리 가게 설정탭 API 연동 * refactor: 라우팅 접근 제어 안정성 강화, 리다이렉트 UX 개선 * refactor: PrivateRoute 내 불필요한 alert 제거 * fix: Zustand 하이드레이션 상태 업데이트 방식 수정 (안티패턴 해결) * refactor: 스웨거에 맞춰 문의하기 폼 스키마 및 UI 필드명 동기화 * feat: 1:1 문의 등록 API 연동 * fix: replace 옵션 추가 * refactor: CategoryEnum 명칭 중복 방지를 위해 Menu/Store용으로 각각 분리 * refactor: getValues() 사용, input id 연결 * refactor: 영업 시간 변환 유틸 함수의 암묵적 기본값 제거, 필수값 검증 로직 추가 * refactor: 가게 등록 로직을 mutateAsync, try-catch 패턴으로 변경하여 에러 처리 강화 * fix: 메뉴 가격 유효성 검사 정규식 수정 (0 허용, 불필요한 선행 0 차단) * fix: 가게 대표 이미지 유효성 검사 강화 * docs: TODO 주석 추가 * chore: 내가게관리 사장 대시보드 코드래빗 반영 수정 * chore: 내가게관리 대시보드 테이블 유형 추가 * chore: 내가게관리 시간슬롯 UI 변경 * chore: 내가게관리 대시보드 코드래빗 반영 수정2 * chore: 메뉴 관리 카테고리 제외 * fix: 메뉴 삭제 알림오류 수정 * chore: 모달 스타일 수정 * refactor: 지오코딩 실패 시 등록 차단 로직 구현 * refactor: 정기 휴무일 접근성 개선 * chore: 가게 설정 코드래빗 반영 수정 * feat: ESC키 핸들러 추가, 모달에 role, aria-modal 등 속성 추가 * fix: 주소 데이터 변환 시 발생할 수 있는 문자열 결합 오류 방지 * refactor: 불필요한 any 타입 캐스팅 제거 * chore: 메뉴관리 코드래빗 반영 수정 * feat: 마이페이지 비밀번호변경/회원탈퇴 API연동 (#71) * feat: 마이페이지 계정설정 API연동(비밀번호변경/회원탈퇴) * refactor: 미저장 파일 저장 * WIP: 미저장 파일 저장 * fix: 코드래빗 수정사항 반영 * fix: 회원탈퇴 메세지 프론트에서 처리중(내일 아침중으로 백서버배포후 수정예정) * fix:코드래빗 수정사항 반영 * fix:폰넘버 지역번호 자릿수 해결로직추가 * feat: 마이페이지 내 정보 조회/수정 API연동 (#63) * feat:마이페이지 내 정보 조회/수정 API연동 * chore: 프로필이미지 업로드 API연동(500에러터짐 문의중) * fix: 이미지 파일형식 삭제 * fix: 아이디 제거, 코드래빗 수정사항 반영, 서버 이미지업로드오류 해결중 * fix: 코드래빗 수정사항 반영 * fix: 폰넘버 02 자릿수 로직 추가 * refactor: 주석 제거 * fix: 코드래빗 수정사항 반영 * fix: 마이페이지 내 결제수단 관리 탭 삭제 (#73) * chore: 코드래빗 반영 수정 * chore: 로고/아이콘 변경 (#75) * chore: 메인페이지 헤더 로고변경 * chore: publicLayout 로고 변경 * chore: icon수정 및 UX완성도 고도화작업진행 * chore: 로고+텍스트 Link로 요소 변경 * fix: mock데이터 삭제, 주석 삭제, 안쓰는 데이터 삭제 (#77) * fix:mock데이터 삭제, 주석 삭제, 안쓰는 데이터 삭제 * style:이미지 파일 추가 * fix: 코드래빗 수정사항 반영 * fix: build수정 * fix: build수정 * fix:build 수정 * fix:build수정 * fix: MyInfoPage 대소문자 정리 * fix:배포용 파일명 대소문자 통일 * chore: trigger vercel redeploy * fix: ownerpage 에러 수정 * feat: 마이페이지 예약현황 API 연동 * chore: 코드래빗반영 수정 * fix: 배포후 에러 수정 (#81) * fix: Vercel에 SPA rewrite 설정 * fix:메인페이지 하단 사장님으로 등록하기 링크추가 * fix: 메인 하단에 사용하지 않는 링크들 이동 막아둠 * fix: 불필요한 버튼 제거, 버튼 텍스트 수정 * refactor: 주석제거 * fix: 마이페이지 내 계정설정 알림관련 저장 기능 수정 * fix: 코드래빗 수정사항 적용 * refactor: 버튼 디자인 수정 * fix: 예약금 환불불가 안내사항 추가 * feat: 마이페이지 내 가게 관리 내 가게 조회 API 연동 * chore: 코드래빗 반영 수정 * chore: 사용되지 않는 변수 수정 * chore: 코드래빗 반영 수정 * fix: 주소 유효성 검사 타이밍 수정, 지역 제한 에러 핸들링 추가 * fix: 영업 시간 유효성 검사 제한 해제 * style: css 수정 * style: 헤더 수정 * remove: 헤더 소개 삭제 * remove: block 삭제 * fix: 예약 시간 간격 로직 개선 * fix: 매뉴 모달 카테고리 매핑 오류 수정 (#92) * fix: 메뉴 카테고리 매핑으로 메뉴 모달 오류 해결 * fix: axios수정 * docs: readme 최종결과물 링크추가, 폴더구조정리 (#95) * feat: 식당검색 리스트 스켈레톤 UI 추가, 식당카드에 별점관련 내용 제거 (#97) * feat: RestaurantListSkeleton 추가 * feat: RestaurantCard 스켈레톤 UI 추가 * feat: SearchPage 로딩 스켈레톤 UI추가, isFetching 기반 상태 분기 정리 * feat: 검색 결과 로딩 UX 개선 * fix: 별점 관련 내용 제거 * chore: 코드래빗 수정사항 반영 * docs: README 서비스 소개/팀소개 추가 (#99) * docs: README 서비스 소개/팀소개 추가 * docs: README 수정 * docs: img 삭제 * feat: 사업자 인증 대표자명 필드 추가, 예외 처리 보완 * refactor: 네이티브 confirm 창을 커스텀 ConfirmModal로 교체 * refactor: 코드래빗 피드백 반영 * refactor: 코드래빗 피드백 반영 * refactor: 코드래빗 피드백 반영 * fix: 토스페이먼츠 고객키값 2글자 미만 오류수정 (#105) * style: 줄바꿈 수정 * feat: 식당 테이블 이미지 등록, 삭제 ui 구현 및 api 연동 * fix: 가게 검색시 좌표 응답 매핑 추가 (#108) * fix: 검색 좌표 누락 대비해서 NaN으로 임시 처리 * fix: 가게 검색 좌표 응답 매핑 추가 및 지오코딩 fallback 유지 * fix: 카카오맵 마커 목록에서 location 필수 타입으로 좁혀서 빌드 오류 해결 * fix: 좌표가 0이 될때의 오류 방지 처리, toNum과 normalizeLatLng 함수 의존성배열경고피하기 위해 컴포넌트 외부로 이동, 지도컨테이너 접근성 개선 * refactor: 코드래빗 피드백 반영 * design: 예약 모달 UX 개선 (#111) * wip: 닫기 UX 구현중(미적용함.미완성) * design: 모달 열고닫을떄 애니메이션 추가 * chore: return 조건 오류 수정 * fix: 사용하지않는 import 구문삭제하여 build error해결 * feat: 가게 설정 테이블 이미지 삭제 UI 처리 및 삭제 확인 모달 추가 (#113) * feat: 가게 설정 테이블 이미지 삭제 UI처리 및 삭제 확인 모달 추가 * wip: 서버에서 tableId내려오면 바로 교체 * fix: 가게 설정 테이블 이미지 서버 배포 연동완료 * chore: 코드래빗 수정사항 반영 * fix: 휴무일 클릭시 서버에러 오류를 휴무일로 메세지 변경 * fix: build 오류 해결 * chore: 코드래빗 수정사항 반영 * chore: button에 aria-label --------- Co-authored-by: Dew <eidnwq@gmail.com> Co-authored-by: unknown <tjfgml8054@naver.com>
💡 개요
가게 검색 시, api에서 내려주는 좌표를 우선 사용하도록 수정하고, 기존에 주소 기반으로 진행한 지오코딩은 fallback으로 유지하도록 개선함
🔢 관련 이슈 링크
💻 작업내용
latitude/longitude를RestaurantSummary.location으로 매핑RestaurantSummary.location을 optional로 변경해서 좌표가 없을때의 케이스 대응함.📌 변경사항PR
🤔 추가 논의하고 싶은 내용
✅ 체크리스트
Summary by CodeRabbit
릴리스 노트