diff --git a/app/main/_components/MyCoinSection.tsx b/app/main/_components/MyCoinSection.tsx index ff2db8c..89a5e19 100644 --- a/app/main/_components/MyCoinSection.tsx +++ b/app/main/_components/MyCoinSection.tsx @@ -1,7 +1,32 @@ +import { useItems } from "@/hooks/useItems"; import Image from "next/image"; import React from "react"; const MyCoinSection = () => { + const { data, isLoading, isError } = useItems(); + + if (isLoading) { + return ( +
+
+
+
+
+
+
+
+
+
+
+ ); + } + + if (isError || !data) { + return null; + } + + const { matchingTicketCount, optionTicketCount } = data.data; + return (
@@ -13,7 +38,9 @@ const MyCoinSection = () => { height={20} className="mr-2 ml-4" /> - 1개 + + {matchingTicketCount}개 +
{ width={20} height={20} /> - 1개 + + {optionTicketCount}개 +