Skip to content

Commit

Permalink
fix: api url 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jinjoo-jung committed Jan 22, 2024
1 parent 803ab6f commit 23af3b8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 6 additions & 3 deletions src/api/lib/getCouponList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ const getCouponList = async (
status,
title
};
const response = await instance.get(`/v1/coupons/${accommodationId}`, {
params
});
const response = await instance.get(
`/v1/accommodations/${accommodationId}/coupons`,
{
params
}
);
return response.data;
};

Expand Down
2 changes: 0 additions & 2 deletions src/components/CouponList/CouponMain/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ import {
CouponWait
} from '../CouponItem';
import couponListState from '@recoil/atoms/couponListState';
import Modal from '@components/modal';

const CouponMain = () => {
const coupons = useRecoilValue(couponListState);
console.log('recoil로 관리되는 쿠폰 리스트 ', coupons);

return (
<MainContainer>
<Modal />
{coupons?.content.map((coupon, index) => {
switch (coupon.coupon_status) {
case '노출 ON':
Expand Down

0 comments on commit 23af3b8

Please sign in to comment.