Skip to content
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

History 정렬 기능 추가 #172

Merged
merged 11 commits into from
Sep 5, 2024
Merged

History 정렬 기능 추가 #172

merged 11 commits into from
Sep 5, 2024

Conversation

sumi-0011
Copy link
Member

@sumi-0011 sumi-0011 commented Sep 2, 2024

💡 기능

  • Product 탭과 동일하게 정렬기능이 추가됩니다. Product 탭에서 사용하는 custom hook을 분리하여 공통적으로 사용할 수 있도록 하였어요.
  • History 정렬 기능 추가
  • 기존에 사용하던 History API를 제거하고, packages/api에 API를 추가하여 사용하도록 변경하였습니다.

🔎 기타

Summary by CodeRabbit

  • New Features

    • 검색 옵션 관리 시스템이 도입되어, 사용자가 여러 검색 기준을 동시에 선택할 수 있게 되었습니다.
    • OrderTypeSelect, SortDirectionSelect, PersonaType 컴포넌트가 추가되어 제품 정렬 및 필터링 기능이 향상되었습니다.
    • useSearchOptions 훅이 추가되어 검색 옵션 관리를 간소화했습니다.
  • Bug Fixes

    • 검색 옵션 변경 시 페이지가 초기화되도록 수정하여 사용자 경험을 개선했습니다.
  • Refactor

    • useGetHistoryuseGetProducts 훅의 구조가 간소화되어 코드 유지보수성이 향상되었습니다.
    • 제품 테이블 및 히스토리 테이블의 데이터 처리 로직이 개선되었습니다.
  • Style

    • 사용자 인터페이스 개선을 위한 스타일링 업데이트가 포함되었습니다.

@sumi-0011 sumi-0011 self-assigned this Sep 2, 2024
@sumi-0011 sumi-0011 requested a review from hyesungoh as a code owner September 2, 2024 14:27
@sumi-0011 sumi-0011 changed the base branch from main to refactor/product-list-sort September 2, 2024 14:27
Copy link

coderabbitai bot commented Sep 2, 2024

Walkthrough

이번 변경 사항은 useGetHistoryuseGetProducts 훅에서 사용자 정의 요청 및 응답 인터페이스를 제거하고, API에서 제공하는 타입을 직접 사용하도록 수정되었습니다. HistoryTableProductTable 컴포넌트는 새로운 검색 옵션 관리 시스템을 통합하여 필터링 기능을 향상시켰습니다. 여러 새로운 컴포넌트가 추가되어 사용자 인터페이스가 개선되었으며, API와의 상호작용이 간소화되었습니다.

Changes

파일 경로 변경 요약
apps/web/src/apis/auctions/useGetHistory.ts, apps/web/src/apis/auctions/useGetProducts.ts 사용자 정의 요청 및 응답 인터페이스 제거, API의 타입을 직접 사용하도록 변경, getHistorygetProducts 함수 수정.
apps/web/src/app/shop/HistoryTable.tsx, apps/web/src/app/shop/ProductTable.tsx 새로운 검색 옵션 관리 시스템 통합, 데이터 가져오기 로직 간소화 및 사용자 인터페이스 개선.
apps/web/src/app/shop/SearchOption/OrderTypeSelect.tsx, apps/web/src/app/shop/SearchOption/SortDirectionSelect.tsx, apps/web/src/app/shop/SearchOption/SearchOptionSelect.tsx 검색 옵션 선택을 위한 새로운 컴포넌트 추가.
apps/web/src/app/shop/SearchOption/PersonaType.tsx Search 함수 이름을 PersonaType으로 변경.
apps/web/src/app/shop/SearchOption/index.ts OrderTypeSelect, PersonaType, SortDirectionSelect 컴포넌트를 중앙에서 내보내는 모듈 추가.
apps/web/src/app/shop/SellListSection/index.tsx onEditAction 함수의 매개변수 타입을 Product['id']로 변경, 렌더링 로직 수정.
apps/web/src/app/shop/useSearchOptions.ts useSearchOptions 커스텀 훅 추가, 검색 옵션 관리 기능 구현.
apps/web/src/components/ProductTable/ShopTableRowView.tsx Props 인터페이스 수정, onAction 함수의 매개변수 타입 변경.
packages/api/src/auction/getProductHistories.ts 제품 이력 데이터 검색 기능 추가, 요청 및 응답 스키마 정의.
packages/api/src/auction/getProducts.ts 요청 스키마의 유효성 검사 로직 개선, 새로운 스키마 사용.
packages/api/src/auction/index.ts getProductHistories 모듈 내보내기 추가.
packages/api/src/auction/schema.ts ProductSchema 수정, 새로운 스키마 및 타입 추가.

Poem

🐰 변화의 바람이 불어와
새로운 길이 열리네, 우와!
검색 옵션이 늘어나고,
필터링이 더 쉬워졌네,
우리 모두 함께 뛰어보자,
즐거운 쇼핑의 세상으로! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Caution

Inline review comments failed to post

Actionable comments posted: 3

Outside diff range, codebase verification and nitpick comments (1)
apps/web/src/app/shop/ProductTable.tsx (1)

20-21: 빈 인터페이스를 타입 별칭으로 바꾸는 것을 고려해 보세요.

빈 인터페이스는 {}와 동일하므로 타입 별칭으로 대체할 수 있습니다. 하지만 이는 사소한 문제이며 기능에는 영향을 미치지 않습니다.

-interface ProductTableProps {}
+type ProductTableProps = {};
Tools
Biome

[error] 20-21: An empty interface is equivalent to {}.

Safe fix: Use a type alias instead.

(lint/suspicious/noEmptyInterface)

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 79dd80a and 9490e43.

Files selected for processing (16)
  • apps/web/src/apis/auctions/useGetHistory.ts (1 hunks)
  • apps/web/src/apis/auctions/useGetProducts.ts (1 hunks)
  • apps/web/src/app/shop/HistoryTable.tsx (1 hunks)
  • apps/web/src/app/shop/ProductTable.tsx (4 hunks)
  • apps/web/src/app/shop/SearchOption/OrderTypeSelect.tsx (1 hunks)
  • apps/web/src/app/shop/SearchOption/PersonaType.tsx (2 hunks)
  • apps/web/src/app/shop/SearchOption/SearchOptionSelect.tsx (1 hunks)
  • apps/web/src/app/shop/SearchOption/SortDirectionSelect.tsx (1 hunks)
  • apps/web/src/app/shop/SearchOption/index.ts (1 hunks)
  • apps/web/src/app/shop/SellListSection/index.tsx (3 hunks)
  • apps/web/src/app/shop/useSearchOptions.ts (1 hunks)
  • apps/web/src/components/ProductTable/ShopTableRowView.tsx (2 hunks)
  • packages/api/src/auction/getProductHistories.ts (1 hunks)
  • packages/api/src/auction/getProducts.ts (2 hunks)
  • packages/api/src/auction/index.ts (1 hunks)
  • packages/api/src/auction/schema.ts (2 hunks)
Files skipped from review due to trivial changes (2)
  • apps/web/src/app/shop/SearchOption/PersonaType.tsx
  • apps/web/src/app/shop/SearchOption/index.ts
Additional context used
Biome
apps/web/src/app/shop/HistoryTable.tsx

[error] 14-15: An empty interface is equivalent to {}.

Safe fix: Use a type alias instead.

(lint/suspicious/noEmptyInterface)


[error] 17-17: Unexpected empty object pattern.

(lint/correctness/noEmptyPattern)

apps/web/src/app/shop/ProductTable.tsx

[error] 20-21: An empty interface is equivalent to {}.

Safe fix: Use a type alias instead.

(lint/suspicious/noEmptyInterface)


[error] 23-23: Unexpected empty object pattern.

(lint/correctness/noEmptyPattern)

Additional comments not posted (39)
packages/api/src/auction/index.ts (1)

6-6: 잘 작성된 코드입니다!

getProductHistories 모듈을 export하는 것은 History 탭에 정렬 기능을 도입한다는 PR 목표와 일치합니다. 이 변경으로 index.ts 파일에서 getProductHistories 기능에 접근할 수 있게 되어 모듈 인터페이스가 개선됩니다.

apps/web/src/app/shop/SearchOption/SortDirectionSelect.tsx (1)

1-16: LGTM!

코드 변경 사항이 승인되었습니다.

apps/web/src/apis/auctions/useGetProducts.ts (4)

1-2: LGTM!

@gitanimals/api에서 필요한 타입과 함수를 잘 가져왔습니다.


8-10: LGTM!

useGetProducts 함수 시그니처에서 제네릭 타입 파라미터 <T>를 제거하고, option 파라미터의 타입을 GetProductsResponse로 명시적으로 지정한 것이 좋습니다. 이렇게 하면 타입 안전성과 코드 명확성이 향상됩니다.


Line range hint 12-16: LGTM!

useQuery 훅을 사용하여 queryKeyqueryFn을 잘 설정했습니다. 또한 option 파라미터를 스프레드 연산자로 전달하여 추가 옵션을 useQuery 훅에 전달할 수 있도록 했네요.


Line range hint 1-18: 전체적으로 잘 작성된 코드입니다!

파일 전체를 살펴보았을 때, 필요한 타입과 함수를 @gitanimals/api에서 잘 가져왔고, getProductsQueryKey 함수도 올바르게 구현되었습니다. 또한 useGetProducts 훅의 함수 시그니처를 업데이트하고 useQuery 훅을 사용하여 데이터를 가져오는 부분도 잘 작성되었네요.

코드 구조가 깔끔하고 베스트 프랙티스를 잘 따르고 있습니다. 추가적인 코멘트나 제안 사항은 없습니다. 잘 작성된 코드라고 생각합니다!

apps/web/src/apis/auctions/useGetHistory.ts (4)

1-2: LGTM!

@gitanimals/api 패키지에서 필요한 타입과 함수를 잘 가져왔습니다.


6-6: LGTM!

getHistoryQueryKey 함수가 useGetHistory 훅을 위한 쿼리 키를 잘 생성하고 있습니다.


Line range hint 8-17: LGTM!

useGetHistory 훅이 @gitanimals/apigetHistory 함수를 사용하여 데이터를 잘 가져오고 있습니다. useQuery 훅의 사용도 적절해 보입니다.


Line range hint 1-17: 전반적으로 잘 구현된 것 같습니다!

파일 전체적으로 봤을 때, @gitanimals/api 패키지를 잘 활용하여 코드를 리팩토링한 것으로 보입니다. 불필요한 타입 정의를 제거하고, API의 타입을 직접 사용함으로써 코드의 가독성과 유지보수성이 향상되었습니다. PR의 목표에 잘 부합하는 변경사항이라고 생각합니다.

apps/web/src/app/shop/useSearchOptions.ts (1)

1-23: 잘 구현된 커스텀 훅입니다!

useSearchOptions 커스텀 훅은 검색 옵션 상태를 관리하기 위해 useState 훅을 사용하고 있습니다. 초기 상태는 기본값으로 정의되어 있으며, 현재 상태와 상태를 업데이트하는 함수를 반환합니다. onSearchOptionChange 함수는 setSearchOptions의 함수형 업데이트 형식을 사용하여 이전 상태를 기반으로 상태를 업데이트합니다. 이는 모범 사례를 따르고 있습니다.

packages/api/src/auction/getProducts.ts (3)

3-3: 스키마 import 업데이트 좋습니다!

OrderTypeSchemaSortDirectionSchema를 import하여 orderTypesortDirection 필드의 유효성 검사 로직을 별도의 스키마로 추출한 것은 코드 재사용성과 유지보수성을 높이는 좋은 변경입니다.


15-15: orderType 필드 업데이트 좋습니다!

orderType 필드가 이제 OrderTypeSchema를 사용하여 유효성을 검사하도록 변경된 것은 코드의 모듈성을 높이는 좋은 변경입니다.


16-16: sortDirection 필드 업데이트 좋습니다!

sortDirection 필드가 이제 SortDirectionSchema를 사용하여 유효성을 검사하도록 변경된 것은 코드의 모듈성을 높이는 좋은 변경입니다.

apps/web/src/app/shop/SearchOption/SearchOptionSelect.tsx (1)

1-36: 컴포넌트가 잘 구현되었습니다!

SearchOptionSelect 컴포넌트는 다음과 같은 모범 사례를 따르고 있습니다:

  • 컴포넌트는 props를 받아 JSX를 반환하는 순수 함수입니다.
  • 컴포넌트는 재사용 가능하며 애플리케이션의 다른 부분에서 사용할 수 있습니다.
  • 컴포넌트는 스타일링을 위해 custom hook을 사용하고 있는데, 이는 관심사를 분리하는 좋은 방법입니다.
  • 컴포넌트는 시맨틱 HTML 요소를 사용하고 있어 접근성에 좋습니다.

변경 사항이 승인되었습니다.

packages/api/src/auction/getProductHistories.ts (4)

1-4: 좋아 보입니다!

코드 변경사항이 승인되었습니다.


6-12: 좋아 보입니다!

코드 변경사항이 승인되었습니다.


14-17: 좋아 보입니다!

코드 변경사항이 승인되었습니다.


22-26: 좋아 보입니다!

코드 변경사항이 승인되었습니다.

convertCamelObjToKebab 유틸리티 함수의 사용법을 확인하세요.

코드베이스에서 convertCamelObjToKebab 유틸리티 함수의 사용법이 일관되게 적용되었는지 확인하는 것이 좋겠습니다.

다음 스크립트를 실행하여 함수 사용법을 확인할 수 있습니다:

Verification successful

convertCamelObjToKebab 함수의 사용법이 일관됩니다.

코드베이스 전반에 걸쳐 convertCamelObjToKebab 함수가 일관되게 사용되고 있습니다. 이 함수는 API 요청 전에 객체 키를 camelCase에서 kebab-case로 변환하는 데 사용됩니다. 사용법에 문제가 없습니다.

  • 정의 위치:
    • apps/web/src/utils/string.ts
    • packages/api/src/utils.ts
  • 사용 위치:
    • apps/web/src/apis/auctions/useGetMyProduct.ts
    • packages/api/src/auction/getProducts.ts
    • packages/api/src/auction/getProductHistories.ts
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: `convertCamelObjToKebab` 유틸리티 함수의 모든 사용법을 검색합니다. 

# Test: 함수 사용법을 검색합니다. Expect: 일관된 사용법
rg --type typescript -A 5 $'convertCamelObjToKebab'  

Length of output: 85


Script:

#!/bin/bash
# Description: `convertCamelObjToKebab` 유틸리티 함수의 모든 사용법을 검색합니다.

# Test: 함수 사용법을 검색합니다. Expect: 일관된 사용법
rg --type ts -A 5 $'convertCamelObjToKebab'

Length of output: 3007

packages/api/src/auction/schema.ts (5)

12-12: paymentState 속성의 타입 변경을 승인합니다.

paymentState 속성을 특정 문자열 리터럴의 유니온 타입으로 변경하면 타입 안전성이 향상되어 데이터 모델의 명확성과 신뢰성이 개선됩니다.


16-16: ProductStatusType의 추가를 승인합니다.

ProductStatusType을 추가하면 코드베이스의 다른 부분에서 결제 상태를 보다 명시적으로 사용할 수 있어 더 나은 타입 관리가 가능합니다.


29-29: HistoryProductSchema의 변경을 승인합니다.

HistoryProductSchema가 스프레드 연산자를 사용하여 ProductSchema를 확장하면 HistoryProduct가 자체 특정 속성을 추가하면서 Product 타입과 일관성을 유지할 수 있습니다.


38-39: OrderTypeSchemaOrderType의 추가를 승인합니다.

OrderTypeSchema는 정렬 옵션에 대한 유니온 타입을 정의하고, OrderTypeOrderTypeSchema에서 추론됩니다. 이러한 추가를 통해 애플리케이션에서 정렬 로직을 구조화되고 타입에 안전한 방식으로 처리할 수 있습니다.


41-42: SortDirectionSchemaSortDirection의 추가를 승인합니다.

SortDirectionSchema는 정렬 방향에 대한 가능한 값을 지정하고, SortDirectionSortDirectionSchema에서 추론됩니다. 이러한 추가를 통해 애플리케이션에서 정렬 로직을 구조화되고 타입에 안전한 방식으로 처리할 수 있습니다.

apps/web/src/components/ProductTable/ShopTableRowView.tsx (3)

8-8: Props 인터페이스 변경 사항이 좋아 보입니다!

Props 인터페이스가 Product 타입에서 필요한 속성만 선택하도록 변경되었습니다. 이는 item prop의 구조를 단순화하고 타입 안전성을 향상시킵니다.


9-9: onAction 함수의 매개변수 타입 변경이 좋습니다!

onAction 함수의 매개변수 타입이 ProductItemType에서 Product['id']로 변경되었습니다. 이제 함수는 전체 아이템 객체 대신 제품의 id만 필요로 합니다. 이는 상호작용에 필수적인 속성에 초점을 맞춤으로써 컴포넌트 API의 명확성을 향상시킵니다.


14-14: ShopTableRowView 함수의 매개변수 변경이 좋아 보입니다!

함수 시그니처가 onAction, actionLabel, actionColor를 props에서 직접 구조 분해하도록 조정되었습니다. item의 나머지 속성은 rest 연산자(...item)를 사용하여 수집됩니다. 이 변경은 렌더링과 상호작용에 필수적인 속성에 초점을 맞춤으로써 컴포넌트 API의 명확성을 향상시킵니다.

apps/web/src/app/shop/SellListSection/index.tsx (3)

2-2: LGTM!

Product 타입을 @gitanimals/api에서 가져오는 것은 좋은 변경사항입니다. 이는 제품 식별을 위해 더 구조화된 타입을 사용하는 것과 관련이 있습니다.


34-35: LGTM!

onEditAction 함수의 매개변수 타입을 ProductType에서 Product['id']로 변경한 것은 좋은 결정입니다. 이는 타입 안전성과 명확성을 향상시킵니다. 함수 본문에서 editProductId 상태 변수를 제공된 id로 설정하는 것도 올바른 방식입니다.


45-47: LGTM!

ShopTableRowView 컴포넌트에 전체 product 객체를 전달하는 대신 id, persona, price와 같은 개별 속성을 전달하는 것은 좋은 변경사항입니다. 이는 데이터 처리에서 성능과 명확성을 향상시킬 수 있습니다. 필요한 속성들이 컴포넌트에 올바르게 전달되고 있습니다.

apps/web/src/app/shop/HistoryTable.tsx (5)

10-11: 코드 변경 사항이 승인되었습니다.

검색 옵션을 관리하는 데 필요한 컴포넌트와 훅을 올바르게 가져오고 있습니다.


20-25: 코드 변경 사항이 승인되었습니다.

useSearchOptions 훅을 사용하여 검색 옵션을 관리하고, useGetHistory 훅을 사용하여 현재 페이지와 검색 옵션에 따라 히스토리 데이터를 가져오는 것이 올바르게 구현되었습니다.


27-31: 코드 변경 사항이 승인되었습니다.

검색 옵션이 변경될 때마다 useEffect 훅을 사용하여 현재 페이지를 0으로 재설정하는 것은 사용자 경험을 개선하는 좋은 방법입니다. 이렇게 하면 검색 매개변수를 변경한 후 페이지 매김 결과를 탐색할 때 혼동을 방지할 수 있습니다.


40-50: 코드 변경 사항이 승인되었습니다.

OrderTypeSelect, SortDirectionSelectPersonaType 컴포넌트를 사용하여 검색 옵션을 렌더링하고, useSearchOptions 훅의 onSearchOptionChange 함수를 사용하여 사용자가 옵션을 선택할 때 검색 옵션을 업데이트하는 것이 올바르게 구현되었습니다. 이를 통해 사용자는 동시에 여러 기준을 선택할 수 있으며, 더 포괄적인 필터링 인터페이스를 제공합니다.


57-61: 코드 변경 사항이 승인되었습니다.

히스토리 데이터의 각 제품을 렌더링하기 위해 필요한 props를 ShopTableRowView 컴포넌트에 올바르게 전달하고 있습니다.

apps/web/src/app/shop/ProductTable.tsx (4)

4-5: LGTM!

코드 변경 사항이 승인되었습니다.


18-19: LGTM!

코드 변경 사항이 승인되었습니다.


27-65: LGTM!

코드 변경 사항이 승인되었습니다. 컴포넌트는 사용자 정의 훅을 효과적으로 사용하여 검색 옵션을 관리하고 제품을 가져옵니다. 렌더링 로직은 깨끗하고 읽기 쉽습니다.


Line range hint 66-129: LGTM!

코드 변경 사항이 승인되었습니다. 컴포넌트는 훅을 효과적으로 사용하여 제품 작업을 처리하고 올바른 props로 ShopTableRowView 컴포넌트를 렌더링합니다. 제품 상태 및 작업 레이블/색상을 결정하는 로직은 깨끗하고 읽기 쉽습니다.

Comments failed to post (3)
apps/web/src/app/shop/SearchOption/OrderTypeSelect.tsx (1)

1-17: 컴포넌트 구현이 잘 되었습니다!

OrderTypeSelect 컴포넌트의 구현이 React 함수형 컴포넌트 문법을 잘 따르고 있습니다.

size prop을 설정 가능하게 만드는 것이 좋겠습니다.

현재 size prop이 128로 고정되어 있는데, 이는 다양한 사용 사례에 유연하게 대응하기 어려울 수 있습니다. size prop을 부모 컴포넌트에서 설정할 수 있도록 변경하는 것이 좋겠습니다.

options prop을 설정 가능하게 만들거나 외부 소스에서 가져오는 것이 좋겠습니다.

현재 options prop이 하드코딩된 옵션들로 고정되어 있는데, 이는 확장성이 떨어질 수 있습니다. options prop을 부모 컴포넌트에서 설정할 수 있도록 하거나, 외부 소스(예: API)에서 옵션을 가져오도록 변경하는 것이 좋겠습니다.

apps/web/src/app/shop/HistoryTable.tsx (2)

14-15: 빈 인터페이스 대신 타입 별칭을 사용하세요.

ProductTableProps 인터페이스가 비어 있습니다. 이는 {}와 동일합니다. 빈 인터페이스 대신 타입 별칭을 사용하는 것이 더 좋은 방법입니다.

다음과 같이 변경하세요:

-interface ProductTableProps {}
+type ProductTableProps = {};
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

type ProductTableProps = {};
Tools
Biome

[error] 14-15: An empty interface is equivalent to {}.

Safe fix: Use a type alias instead.

(lint/suspicious/noEmptyInterface)


17-17: 빈 객체 패턴을 제거하세요.

HistoryTable 함수는 빈 객체 패턴을 매개변수로 사용하고 있습니다. 이는 예기치 않은 동작입니다. ProductTableProps 인터페이스가 비어 있으므로 이 매개변수를 제거할 수 있습니다.

다음과 같이 변경하세요:

-function HistoryTable({}: ProductTableProps) {
+function HistoryTable() {
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

function HistoryTable() {
Tools
Biome

[error] 17-17: Unexpected empty object pattern.

(lint/correctness/noEmptyPattern)

Base automatically changed from refactor/product-list-sort to main September 4, 2024 06:15
An error occurred while trying to automatically change base from refactor/product-list-sort to main September 4, 2024 06:15
# Conflicts:
#	apps/web/src/app/shop/HistoryTable.tsx
#	apps/web/src/app/shop/ProductTable.tsx
@github-actions github-actions bot added diff: M and removed diff: L labels Sep 5, 2024
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 9490e43 and 8e000a1.

Files selected for processing (1)
  • packages/api/src/auction/getProducts.ts (2 hunks)
Additional comments not posted (3)
packages/api/src/auction/getProducts.ts (3)

3-3: 수입 문 변경 승인

새로운 스키마 OrderTypeSchemaSortDirectionSchema가 추가되어 유지보수성과 재사용성이 향상되었습니다.


15-15: orderType 필드 변경 승인

OrderTypeSchema를 사용하여 스키마 정의가 간소화되고, 유효성 검사 규칙을 더 복잡하게 설정할 수 있는 가능성이 열렸습니다.


16-16: sortDirection 필드 변경 승인

SortDirectionSchema를 사용함으로써 스키마 정의가 간소화되고, 유효성 검사 규칙을 더 복잡하게 설정할 수 있는 가능성이 열렸습니다.

@sumi-0011 sumi-0011 merged commit 0f9501c into main Sep 5, 2024
5 checks passed
@sumi-0011 sumi-0011 deleted the feat/history-sort branch September 5, 2024 15:18
This was referenced Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant