Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ module.exports = {
{ allowConstantExport: true },
],
},
}
};
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 @@ -13,7 +13,8 @@
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hook-form": "^7.60.0",
"react-router": "^7.6.3"
"react-router": "^7.6.3",
"styled-components": "^6.1.19"
},
"devDependencies": {
"@types/react": "^18.2.66",
Expand Down
18 changes: 10 additions & 8 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Route, Routes } from 'react-router';
import Home from './pages/Home';
import Login from './pages/auth/Login';
import MainLayout from './layout/MainLayout';
import Signup from './pages/auth/Signup';
import AuthLayout from './layout/AuthLayout';
import ItemsLayout from './layout/ItemsLayout';
import Items from './pages/items/Items';
import { Route, Routes } from "react-router";
import Home from "./pages/Home";
import Login from "./pages/auth/Login";
import MainLayout from "./layout/MainLayout";
import Signup from "./pages/auth/Signup";
import AuthLayout from "./layout/AuthLayout";
import ItemsLayout from "./layout/ItemsLayout";
import Items from "./pages/items/Items";
import AddItem from "./pages/items/AddItem";

function App() {
return (
Expand All @@ -25,6 +26,7 @@ function App() {
{/* 중고 마켓 */}
<Route element={<ItemsLayout />}>
<Route path="items" element={<Items />} />
<Route path="additem" element={<AddItem />} />
</Route>
</Routes>
</>
Expand Down
5 changes: 5 additions & 0 deletions src/assets/icons/ic_X.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/assets/icons/ic_plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions src/components/DropdownList.jsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import '../styles/components/dropDownList.css';
import { memo, useEffect, useState } from 'react';

function DropdownList({ changeOrder }) {
/**
* 드롭다운 리스트 메뉴
*/
const orderList = [
{ name: '최신순', value: 'recent' },
{ name: '좋아요순', value: 'favorite' },
];
/**
* 드롭다운 리스트 메뉴
*/
const orderList = [
{ name: '최신순', value: 'recent' },
{ name: '좋아요순', value: 'favorite' },
];

function DropdownList({ changeOrder }) {
const [order, setOrder] = useState(orderList[0].name);

/**
Expand All @@ -21,7 +21,7 @@ function DropdownList({ changeOrder }) {
* 드롭다운 리스트 열림/닫힘 이벤트
*/
const onClickOpen = () => {
setIsOpen(!isOpen);
setIsOpen((prevState) => !prevState);
Copy link
Collaborator

Choose a reason for hiding this comment

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

굿굿 ! updater function으로 사용하셨군요 ! 👍👍

};

/**
Expand Down
Loading
Loading