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 ( - +
+ +
+

You have successfully checked inπŸŽ‰

+

You have to yet check in 😌

+
+

You used the below contract to check in

+

{isCheckedIn}

+
+ +
+

Visit the github issue for the checkIn challenge

+
+ +
+
+ + + Onwards to checkIn πŸ‘©πŸ½β€βœˆοΈ + + + See on block explorer πŸ•΅οΈβ€β™‚οΈ + +
+
+
+
+ +
); };