@@ -13,13 +13,16 @@ import {
1313import { Tabs , TabsContent , TabsList , TabsTrigger } from "@/components/ui/Tabs" ;
1414import { Check , X , UserCheck , CreditCard , CheckCircle2 , Calendar , User } from "lucide-react" ;
1515import { cn } from "@/lib/utils" ;
16+ import { Button } from "@/components/ui/Button" ;
17+ import { useRegistEvent } from "../hooks/useRegistEvent" ;
1618
1719interface EventDetailModalProps {
1820 event : UserEventResponse ;
1921}
2022
2123export const EventDetailModal = ( { event } : EventDetailModalProps ) => {
2224 const { event_detail, user_detail } = event ;
25+ const { checkPaymentStatus } = useRegistEvent ( ) ;
2326
2427 const getActiveStep = ( ) => {
2528 if ( event . status === "SUCCESS" ) return 3 ;
@@ -155,7 +158,7 @@ export const EventDetailModal = ({ event }: EventDetailModalProps) => {
155158 </ Stepper >
156159
157160 { event . status === "PENDING" && event . payment_url && (
158- < div className = "mt-4 flex items-center justify-center rounded-md border border-blue-200 bg-blue-50 p-3 dark:border-blue-800 dark:bg-blue-900/20" >
161+ < div className = "mt-4 flex flex-col items-center justify-center gap-4 rounded-md border border-blue-200 bg-blue-50 p-3 dark:border-blue-800 dark:bg-blue-900/20" >
159162 < a
160163 href = { event . payment_url }
161164 target = "_blank"
@@ -164,6 +167,14 @@ export const EventDetailModal = ({ event }: EventDetailModalProps) => {
164167 >
165168 Click here to complete your payment →
166169 </ a >
170+ < Button
171+ className = "cursor-pointer"
172+ onClick = { ( ) => {
173+ checkPaymentStatus ( { transaction_no : event . transaction_no } ) ;
174+ } }
175+ >
176+ Check Payment
177+ </ Button >
167178 </ div >
168179 ) }
169180 </ div >
0 commit comments