Skip to content

Commit

Permalink
Merge pull request #171 from jihwooon/issue-97
Browse files Browse the repository at this point in the history
fix: 장바구니 API 경로 및 컴포넌트 업데이트
  • Loading branch information
jihwooon authored Mar 13, 2024
2 parents 55a6013 + 7da8fa1 commit d47617a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/api/cart.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface AddCartParams {
}

export const addCart = async (params: AddCartParams) => {
const response = await httpClient.post('/cart', params)
const response = await httpClient.post('/carts', params)

return response.data
};
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/book/AddToCart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const AddToCart = ({ book }: Props) => {
</Button>
<div className="added">
<p>장바구니에 추가되었습니다.</p>
<Link to="/cart">장바구니 이동</Link>
<Link to="/carts">장바구니 이동</Link>
</div>
</AddToCartStyle>
);
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/common/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const Header = () => {
{
isloggedIn && (
<ul>
<li><Link to="/cart">장바구니</Link></li>
<li><Link to="/carts">장바구니</Link></li>
<li><Link to="/orderlist">주문내역</Link></li>
<li>
<button onClick={storeLogout}>로그아웃</button>
Expand Down

0 comments on commit d47617a

Please sign in to comment.