Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
0783988
refactor: 불러오는 데이터의 갯수를 커스텀 훅을 생성하여 관리(useScreenBreakpoint, usePageSi…
Chiman2937 May 15, 2025
90c4ccc
fix: 초기에 pageSizeList가 {}로 설정되어 Request 오류 발생하는 현상 수정
Chiman2937 May 15, 2025
17774d3
refactor: Pagination 기능을 커스텀 훅으로 생성(usePaginationByOffset)
Chiman2937 May 15, 2025
340379c
refactor: Login, Signup에서 Form 컴포넌트 분리, render prop으로 각 페이지에서 직접 UI 제…
Chiman2937 May 16, 2025
b3486db
perf(useScreenBreakpoint): state의 초기값을 window.innerWidth에서 null로 변경하고…
Chiman2937 May 16, 2025
2d97756
fix: usePaginationByOffset 호출 시 베스트상품의 pageSize를 전달하여 발생한 오류 수정
Chiman2937 May 16, 2025
1797ea2
refactor: Form Header/Social Login, Items Card 컴포넌트로 변경
Chiman2937 May 17, 2025
2087998
refactor(usePagination): 불필요 state 삭제
Chiman2937 May 17, 2025
678a45a
refactor(Item.jsx): 베스트 상품, 전체 상품, 페이지버튼 컴포넌트로 변경
Chiman2937 May 17, 2025
0b5b4bb
refactor(Form, Field): rendor props 방식 삭제 후 원복(validators를 useFormFie…
Chiman2937 May 18, 2025
a623819
refactor: pages 폴더에있는 컴포넌트 이름을 ...page로 통일
Chiman2937 May 18, 2025
55be06e
pref: Items Page Skeleton UI 추가
Chiman2937 May 18, 2025
5abf424
perf: 상품 검색 시 쿼리스트링 변경/주소창 검색 기능 추가
Chiman2937 May 18, 2025
afb9703
feat: 스프린트 미션6 기능 구현 완료
Chiman2937 May 18, 2025
02c3f04
refactor: items Page skeleton UI 그라데이션 애니메이션으로 변경
Chiman2937 May 19, 2025
68cfc95
refactor: AddItemPage class 이름 정리
Chiman2937 May 19, 2025
8eb6bf0
fix: ItemsContainer css import 오타 수정
Chiman2937 May 19, 2025
eea7731
refactor: 상품등록페이지의 h2태그를 label태그로 변경
Chiman2937 May 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
143 changes: 138 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"react-dom": "^19.0.0",
"react-responsive": "^10.0.1",
"react-router": "^7.5.3",
"react-router-dom": "^7.5.3"
"react-router-dom": "^7.5.3",
"styled-components": "^6.1.18"
},
"devDependencies": {
"@eslint/js": "^9.22.0",
Expand Down
Binary file added public/images/ic_X.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/ic_plus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/icon_password_invisible.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/icon_password_visible.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 20 additions & 18 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import Home from './pages/Home/Home';
import Login from './pages/Auth/Login';
import Signup from './pages/Auth/Signup';
import Items from './pages/Items/Items';
import Privacy from './pages/Privacy/Privacy';
import Faq from './pages/Faq/Faq';
import AddItem from './pages/AddItem/AddItem';
import { LoginStateProvider } from './contexts/LoginStateContext';
import Board from './pages/Board/Board';
import { BrowserRouter, Routes, Route } from "react-router-dom";
import { LoginStateProvider } from "./contexts/LoginStateContext";
import HomePage from "./pages/HomePage/HomePage";
import LoginPage from "./pages/AuthPage/LoginPage";
import SignupPage from "./pages/AuthPage/SignupPage";
import ItemsPage from "./pages/ItemsPage/ItemsPage";
import AddItemPage from "./pages/AddItemPage/AddItemPage";
import PrivacyPage from "./pages/PrivacyPage/PrivacyPage";
import FaqPage from "./pages/FaqPage/FaqPage";
import BoardPage from "./pages/BoardPage/BoardPage";

function App() {
return (
<BrowserRouter>
<LoginStateProvider>
<Routes>
<Route path="/" element={<Home />} />
<Route path="/login" element={<Login />} />
<Route path="/signup" element={<Signup />} />
<Route path="/items" element={<Items />} />
<Route path="/board" element={<Board />} />
<Route path="/additem" element={<AddItem />} />
<Route path="/privacy" element={<Privacy />} />
<Route path="/faq" element={<Faq />} />
<Route path="/">
<Route index element={<HomePage />} />
<Route path="items" element={<ItemsPage />} />
<Route path="board" element={<BoardPage />} />
<Route path="additem" element={<AddItemPage />} />
<Route path="privacy" element={<PrivacyPage />} />
<Route path="faq" element={<FaqPage />} />
</Route>
<Route path="/login" element={<LoginPage />} />
<Route path="/signup" element={<SignupPage />} />
</Routes>
</LoginStateProvider>
</BrowserRouter>
Expand Down
44 changes: 44 additions & 0 deletions src/components/BestItemsSection.jsx
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;
Loading
Loading