From dfbf6e585f8cfc34ae5eae6f63d965546dc66b72 Mon Sep 17 00:00:00 2001 From: EdiFarcas Date: Sat, 3 May 2025 09:28:50 +0300 Subject: [PATCH] Giveaway modal for the giveaways --- src/components/GiveawayCard.tsx | 50 +++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/src/components/GiveawayCard.tsx b/src/components/GiveawayCard.tsx index 931e05c..2989fa6 100644 --- a/src/components/GiveawayCard.tsx +++ b/src/components/GiveawayCard.tsx @@ -1,4 +1,5 @@ -import React from 'react'; +"use client" +import React, { useState } from 'react'; interface GiveawayCardProps { title: string; @@ -7,13 +8,50 @@ interface GiveawayCardProps { } const GiveawayCard: React.FC = ({ title, description, imageUrl }) => { + const [isModalOpen, setIsModalOpen] = useState(false); + + const handleEnterClick = () => { + // Logic to enter the giveaway + setIsModalOpen(true); + }; + + const handleCloseModal = () => { + setIsModalOpen(false); + }; + return ( -
- {/* {title} */} -
-

{title}

-

{description}

+
+
+
+

{title}

+

{description}

+
+
+ +
+ + {/* Modal */} + {isModalOpen && ( +
+
+

{title}

+

{description}

+ {title} + +
+
+ )}
); };