From aa2ea96c1f3984bc01feb61dcb4a59fb893f5a4e Mon Sep 17 00:00:00 2001 From: dasosann Date: Mon, 16 Mar 2026 15:50:37 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=EB=A9=94=EC=9D=B8=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=20api=EC=97=B0=EB=8F=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/main/_components/MyCoinSection.tsx | 33 ++++++- app/main/_components/ScreenMainPage.tsx | 125 +++++------------------- app/main/page.tsx | 39 +++++++- hooks/useItems.ts | 42 ++++++++ hooks/useMatchingHistory.ts | 66 +++++++++++++ 5 files changed, 202 insertions(+), 103 deletions(-) create mode 100644 hooks/useItems.ts create mode 100644 hooks/useMatchingHistory.ts 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}개 +