diff --git a/packages/nextjs/components/CheckInFlag.tsx b/packages/nextjs/components/CheckInFlag.tsx index 99a83fa..5ff272a 100644 --- a/packages/nextjs/components/CheckInFlag.tsx +++ b/packages/nextjs/components/CheckInFlag.tsx @@ -1,20 +1,61 @@ import { useAccount } from "wagmi"; import { useIsCheckedIn } from "~~/hooks/scaffold-eth/useIsCheckedIn"; +//This is the isCheckedIn is used as flag and also as the address of the deployed checkin contract + export const CheckInFlag = () => { const isCheckedIn = useIsCheckedIn(); const { isConnected } = useAccount(); + const openModal = (modalId: string) => { + const modal = document.getElementById(modalId) as HTMLDialogElement; + if (modal) { + modal.showModal(); + } + }; return ( - +