Skip to content

Commit

Permalink
[Feat] [GGFE-195] 코인 내역 api 연결
Browse files Browse the repository at this point in the history
  • Loading branch information
hyobb109 committed Aug 30, 2023
1 parent 4696643 commit ab7bddf
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions components/modal/store/UserCoinHistoryModal.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import Image from 'next/image';
import { useEffect, useState } from 'react';
import { useSetRecoilState } from 'recoil';
import { ICoin, ICoinHistoryTable } from 'types/userTypes';
import { mockInstance } from 'utils/mockAxios';
import { instance } from 'utils/axios';
import { errorState } from 'utils/recoil/error';
import { modalState } from 'utils/recoil/modal';
import {
Expand Down Expand Up @@ -34,11 +33,11 @@ export default function UserCoinHistoryModal({ coin }: ICoin) {
getCoinHistoryList();
}, [currentPage]);

// TODO: instance로 수정
// 현재는 출석만 되는 상태
const getCoinHistoryList = async () => {
try {
const res = await mockInstance.get(
`/users/coin/?page=${currentPage}&size=5`
const res = await instance.get(
`pingpong/users/coinhistory/?page=${currentPage}&size=5`
);
setCoinHistoryList({
useCoinList: res.data.useCoinList,
Expand Down

0 comments on commit ab7bddf

Please sign in to comment.