-
Notifications
You must be signed in to change notification settings - Fork 39
[김치영] sprint6 #162
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
addiescode-sj
merged 18 commits into
codeit-bootcamp-frontend:React-김치영
from
Chiman2937:React-김치영-sprint6
May 22, 2025
The head ref may contain hidden characters: "React-\uAE40\uCE58\uC601-sprint6"
Merged
[김치영] sprint6 #162
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
0783988
refactor: 불러오는 데이터의 갯수를 커스텀 훅을 생성하여 관리(useScreenBreakpoint, usePageSi…
Chiman2937 90c4ccc
fix: 초기에 pageSizeList가 {}로 설정되어 Request 오류 발생하는 현상 수정
Chiman2937 17774d3
refactor: Pagination 기능을 커스텀 훅으로 생성(usePaginationByOffset)
Chiman2937 340379c
refactor: Login, Signup에서 Form 컴포넌트 분리, render prop으로 각 페이지에서 직접 UI 제…
Chiman2937 b3486db
perf(useScreenBreakpoint): state의 초기값을 window.innerWidth에서 null로 변경하고…
Chiman2937 2d97756
fix: usePaginationByOffset 호출 시 베스트상품의 pageSize를 전달하여 발생한 오류 수정
Chiman2937 1797ea2
refactor: Form Header/Social Login, Items Card 컴포넌트로 변경
Chiman2937 2087998
refactor(usePagination): 불필요 state 삭제
Chiman2937 678a45a
refactor(Item.jsx): 베스트 상품, 전체 상품, 페이지버튼 컴포넌트로 변경
Chiman2937 0b5b4bb
refactor(Form, Field): rendor props 방식 삭제 후 원복(validators를 useFormFie…
Chiman2937 a623819
refactor: pages 폴더에있는 컴포넌트 이름을 ...page로 통일
Chiman2937 55be06e
pref: Items Page Skeleton UI 추가
Chiman2937 5abf424
perf: 상품 검색 시 쿼리스트링 변경/주소창 검색 기능 추가
Chiman2937 afb9703
feat: 스프린트 미션6 기능 구현 완료
Chiman2937 02c3f04
refactor: items Page skeleton UI 그라데이션 애니메이션으로 변경
Chiman2937 68cfc95
refactor: AddItemPage class 이름 정리
Chiman2937 8eb6bf0
fix: ItemsContainer css import 오타 수정
Chiman2937 eea7731
refactor: 상품등록페이지의 h2태그를 label태그로 변경
Chiman2937 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import { useEffect, useState } from "react"; | ||
| import { getItems } from "../utils/api"; | ||
| import ItemsContainer from "./ItemsContainer"; | ||
| import styles from "./ItemsSection.module.css"; | ||
|
|
||
| const LIST_TYPE = "best"; | ||
|
|
||
| const BestItemsSection = ({ pageSize }) => { | ||
| const [bestItemList, setBestItemList] = useState([]); | ||
|
|
||
| const loadBestItemList = async (options) => { | ||
| const result = await getItems(options); | ||
| if (!result) return; | ||
| const { list } = result; | ||
| setBestItemList(list); | ||
| }; | ||
|
|
||
| useEffect(() => { | ||
| if (!pageSize) return; | ||
| (async () => { | ||
| await loadBestItemList({ | ||
| offset: 1, | ||
| pageSize: pageSize, | ||
| orderBy: "favorite", | ||
| keyword: "", | ||
| }); | ||
| })(); | ||
| }, [pageSize]); | ||
|
|
||
| return ( | ||
| <section className={`${styles["cards-section"]} ${styles[LIST_TYPE]}`}> | ||
| <div className={styles["section-header-container"]}> | ||
| <h2 className={styles["section-title"]}>베스트 상품</h2> | ||
| </div> | ||
| <ItemsContainer | ||
| listName={LIST_TYPE} | ||
| itemList={bestItemList} | ||
| pageSize={pageSize} | ||
| /> | ||
| </section> | ||
| ); | ||
| }; | ||
|
|
||
| export default BestItemsSection; | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.