Skip to content

feat: middleware 적용, 오류페이지 추가, 일부 컴포넌트 파일명 변경, 리펙토링 #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2025

Conversation

mental-disaster
Copy link
Collaborator

@mental-disaster mental-disaster commented Jul 5, 2025

작업 내용

  • gitignore 추가 (gemini)
  • middleware 적용
  • not found, error 오류페이지 및 테스트 코드 추가
  • 컴포넌트 파일명 파스칼케이스로 변경
  • /auction 페이지 리펙토링
    • categoryPath, setExpandedIds 분리
    • setExpandedIds 호출 -> findCategoryPath 호출 -> setExpandedIds 호출...의 무한 리렌더 오류 방지를 위해 useMemo 사용

@mental-disaster mental-disaster requested a review from dev-ant July 5, 2025 09:01
@dev-ant dev-ant requested a review from Copilot July 7, 2025 12:26
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds middleware, error handling pages, component filename casing updates, and refactors the auction preview page.

  • Introduce middleware to redirect root path to the auction preview
  • Rename auction components (category, list, search) to PascalCase and update related imports/tests
  • Add 404 and error pages (with tests) and wire them into the app routes
  • Refactor /ui-preview/auction/page.tsx to use useMemo for category path and eliminate infinite re-renders

Reviewed Changes

Copilot reviewed 17 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/middleware.ts Add middleware redirect for root path
src/components/page/auction/Search.tsx Rename component to PascalCase and export default
src/components/page/auction/Search.test.tsx Update import path to PascalCase component
src/components/page/auction/List.tsx Rename component to PascalCase and export default
src/components/page/auction/category.tsx Rename component to PascalCase and export default
src/components/page/auction/category.test.tsx Update import path to PascalCase component
src/components/errors/NotFoundPage.tsx Add 404 not-found page component
src/components/errors/NotFoundPage.test.tsx Add tests for 404 page
src/components/errors/ErrorPage.tsx Add generic error page component
src/components/errors/ErrorPage.test.tsx Add tests for error page
src/app/not-found.tsx Route to NotFoundPage
src/app/error.tsx Route to ErrorPage
src/app/(main)/ui-preview/error-test/page.tsx Add UI preview test page for errors
src/app/(main)/ui-preview/auction/page.tsx Refactor auction preview: useMemo for category path, update imports
src/app/(main)/ui-preview/auction/page.test.tsx Update mocks to PascalCase imports
src/app/(main)/layout.tsx Ensure main container fills height
src/app/login/page.test.tsx Make document.referrer configurable in login page tests
Comments suppressed due to low confidence (2)

src/middleware.ts:4

  • [nitpick] The TODO comment is vague; consider clarifying the intended behavior or removing it once requirements are locked down to avoid technical debt.
  // TODO: 추후 확인 후 수정 필요

src/middleware.ts:3

  • There are no tests covering the middleware redirect logic. Adding a unit or integration test for the root-path redirection will help prevent regressions.
export function middleware(request: NextRequest) {

@mental-disaster mental-disaster merged commit 776bfcd into devnogi:main Jul 7, 2025
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.

1 participant