Skip to content

Commit

Permalink
feat : update hooks/useGetDiscountDetail.js (#85)
Browse files Browse the repository at this point in the history
내가 받은 할인 API 호출
  • Loading branch information
JungYeonHwi committed Nov 2, 2023
1 parent c7c4076 commit 368ea6f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions hooks/useGetDiscountDetail.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { useEffect, useState } from "react";
import guestService from "services/guest.service";

const useGetDiscountDetail = () => {
const [data, setData] = useState("");

useEffect(() => {
const getDiscountDetail = async() => {
const fetchData = await guestService.getDiscountDetail();
setData(fetchData);
}

getDiscountDetail();
}, []);

return data;
}

export default useGetDiscountDetail;

0 comments on commit 368ea6f

Please sign in to comment.