Skip to content

refactor: API경로 수정#559

Merged
oriNuguri25 merged 6 commits intomainfrom
develop
Jan 7, 2026
Merged

refactor: API경로 수정#559
oriNuguri25 merged 6 commits intomainfrom
develop

Conversation

@oriNuguri25
Copy link
Collaborator

@oriNuguri25 oriNuguri25 commented Jan 7, 2026

작업 내용

문제점 및 어려움

해결 방안

공유 사항

Summary by CodeRabbit

  • New Features

    • Enhanced payment processing with QR code scanning, validation, and improved support for multiple payment methods
  • Performance Improvements

    • Implemented lazy loading across admin components and modals to reduce initial load times and bundle size
  • Infrastructure

    • Standardized API endpoint structure and updated server configuration for improved backend communication

✏️ Tip: You can customize this high-level summary in your review settings.

dgKim1 and others added 6 commits January 4, 2026 17:45
refactor: 라우트 코드 스플리팅 -> 페이지/레이아웃을 React.lazy + Suspense로 JS 페이로드 시간 감소
refactor: 무거운 의존성 지연 로드
@oriNuguri25 oriNuguri25 merged commit 4b40f81 into main Jan 7, 2026
2 of 3 checks passed
@github-actions github-actions bot requested a review from hwangdae January 7, 2026 14:16
@coderabbitai
Copy link

coderabbitai bot commented Jan 7, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The PR implements component-level code splitting through lazy loading and Suspense in the admin app, refactors the AccountPage payment handling logic with consolidated input state management and QR processing, and standardizes user app API calls by centralizing versioning in the client configuration and removing redundant /v1 prefixes from endpoint paths.

Changes

Cohort / File(s) Summary
Admin App Route & Component Lazy Loading
apps/nowait-admin/src/AppRouter.tsx, apps/nowait-admin/src/pages/AdminBooth/components/BoothSection.tsx, apps/nowait-admin/src/pages/AdminBooth/components/MenuSection.tsx
Introduced React.lazy and Suspense wrappers for page-level and component-level imports (AppRouter, NoticeEditor, ImageCropModal, drag-drop components) to defer loading and reduce initial bundle size.
Admin App AccountPage Payment & Input Refactoring
apps/nowait-admin/src/pages/AdminBooth/components/AccountPage.tsx
Consolidated payment option metadata into a typed PaymentOption array; introduced PaymentId type; restructured input state to use PaymentId keys for URLs, inputs, and sources; implemented lazy-loaded jsQR import and QR processing flow; improved account number parsing from server responses.
Admin App MenuModal Enhancement
apps/nowait-admin/src/pages/AdminBooth/components/Modal/menuModal.tsx
Added lazy loading for ImageCropModal via Suspense; expanded MenuModalProps with isTablet flag and optional id field in initialData structure.
Admin App Configuration
apps/nowait-admin/src/utils/AdminApi.tsx, apps/nowait-admin/vite.config.ts
Added commented LOCAL_API_URL line in AdminApi; configured Vite server and preview to listen on 0.0.0.0:5173 for external access.
User App API Standardization
apps/nowait-user/src/api/menu.ts, apps/nowait-user/src/api/order.ts, apps/nowait-user/src/api/reservation.ts, apps/nowait-user/src/components/common/modal/SearchModal.tsx, apps/nowait-user/src/hooks/useCancelWaiting.ts, apps/nowait-user/src/hooks/useInfiniteStores.ts, apps/nowait-user/src/hooks/useMyWaitingList.ts, apps/nowait-user/src/hooks/useWaitingStores.ts, apps/nowait-user/src/utils/UserApi.tsx
Consolidated direct axios calls to use centralized UserApi client; removed /v1 prefix from all endpoint paths and relocated versioning to UserApi baseURL configuration; updated relative endpoint references across menu, order, reservation, search, and waiting-list APIs.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

Possibly related PRs

  • Develop #399 — Modifies AccountPage payment and input handling logic, with overlapping changes to bank/account field state management.
  • feat: 주문 API 수정 #442 — Updates createOrder and getOrderDetails in order.ts using a centralized HTTP client pattern matching the user app API consolidation.
  • feat: 오더 페이지 css 수정 #509 — Touches ImageCropModal and MenuModal lazy-loading and image-cropping integration flows in the admin app.

Suggested reviewers

  • dgKim1
  • hwangdae

🐰 Lazy loads dance through the air,
API calls find endpoints fair,
Payment states now neat and tight,
Refactored code—a rabbit's delight!

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 66b9ea0 and 8c505e2.

⛔ Files ignored due to path filters (35)
  • apps/nowait-admin/dist/assets/AdminAnalytics-DY_5fbon.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/AdminApi-BnHrq_k2.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/AdminAuth-Y112gamO.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/AdminBooth-DWYMO8hu.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/AdminHome-BO23pV_Y.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/AdminLayout-ClP2txCo.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/AdminOrders-Dg7XulxQ.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/ImageCropModal-CufoH5h3.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/LoginPage-DQaDbACP.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/NotFound-BVIRRYh8.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/NoticeEditor-Dq3cDjt7.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/QrGuides-vzkuMhVa.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/RedBadge-C3tGOhvn.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/arrow_back-Cv2L1D6X.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/banner-BZOeI9vB.svg is excluded by !**/dist/**, !**/*.svg
  • apps/nowait-admin/dist/assets/bg_festival-CYbdk6eS.svg is excluded by !**/dist/**, !**/*.svg
  • apps/nowait-admin/dist/assets/bg_order-C4LFRYk8.svg is excluded by !**/dist/**, !**/*.svg
  • apps/nowait-admin/dist/assets/bg_status-X4xZSgun.svg is excluded by !**/dist/**, !**/*.svg
  • apps/nowait-admin/dist/assets/bg_waiting-B0UxGpnI.svg is excluded by !**/dist/**, !**/*.svg
  • apps/nowait-admin/dist/assets/close-Pq4fSto9.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/closeButton-DcyMdLeL.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/index-BdnsjICJ.css is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/index-Bp-Rb3gs.css is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/index-DWRamT31.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/jsQR-CrlqJ31_.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/naver_frame_8-BzrFoHk8.png is excluded by !**/dist/**, !**/*.png
  • apps/nowait-admin/dist/assets/react-beautiful-dnd.esm-DCM59t6w.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/refresh-CZIaawOm.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/underline-Bqk3dE8x.svg is excluded by !**/dist/**, !**/*.svg
  • apps/nowait-admin/dist/assets/useGetStore-zY2OFe_e.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/useMutation-Dg0Wcmvd.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/useNewOrderToastStore--L-xY90_.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/useQuery-CQz0YXSa.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/assets/useWindowWidth-hcMhglfJ.js is excluded by !**/dist/**
  • apps/nowait-admin/dist/index.html is excluded by !**/dist/**
📒 Files selected for processing (16)
  • apps/nowait-admin/src/AppRouter.tsx
  • apps/nowait-admin/src/pages/AdminBooth/components/AccountPage.tsx
  • apps/nowait-admin/src/pages/AdminBooth/components/BoothSection.tsx
  • apps/nowait-admin/src/pages/AdminBooth/components/MenuSection.tsx
  • apps/nowait-admin/src/pages/AdminBooth/components/Modal/menuModal.tsx
  • apps/nowait-admin/src/utils/AdminApi.tsx
  • apps/nowait-admin/vite.config.ts
  • apps/nowait-user/src/api/menu.ts
  • apps/nowait-user/src/api/order.ts
  • apps/nowait-user/src/api/reservation.ts
  • apps/nowait-user/src/components/common/modal/SearchModal.tsx
  • apps/nowait-user/src/hooks/useCancelWaiting.ts
  • apps/nowait-user/src/hooks/useInfiniteStores.ts
  • apps/nowait-user/src/hooks/useMyWaitingList.ts
  • apps/nowait-user/src/hooks/useWaitingStores.ts
  • apps/nowait-user/src/utils/UserApi.tsx

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants