Skip to content

Commit 2f2dff2

Browse files
committed
v2.0
1 parent c7501e0 commit 2f2dff2

File tree

1 file changed

+54
-2
lines changed

1 file changed

+54
-2
lines changed

src/Page/Home.jsx

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,14 @@ const Tags = () => {
826826
};
827827

828828
const CardSection = () => {
829+
const [isModalOpen, setIsModalOpen] = useState(false);
830+
const [modalContent, setModalContent] = useState('');
831+
832+
const openModal = (content) => {
833+
setModalContent(content);
834+
setIsModalOpen(true);
835+
};
836+
829837
return (
830838
<section className="card-section flex items-center justify-center py-0">
831839
<StyledWrapper>
@@ -844,11 +852,23 @@ const CardSection = () => {
844852
matter.
845853
</p>
846854
<div className="flex gap-12">
847-
<StyledButton onClick={() => window.open('#', '_blank')}>
855+
<StyledButton
856+
onClick={() =>
857+
openModal(
858+
'https://tally.so/embed/npZYxy?alignLeft=1&hideTitle=1&transparentBackground=1&dynamicHeight=1',
859+
)
860+
}
861+
>
848862
<div className="blob1" />
849863
<div className="inner">✨ Suggest new idea!</div>
850864
</StyledButton>
851-
<StyledButton onClick={() => window.open('#', '_blank')}>
865+
<StyledButton
866+
onClick={() =>
867+
openModal(
868+
'https://tally.so/embed/mVxWG6?alignLeft=1&hideTitle=1&transparentBackground=1&dynamicHeight=1',
869+
)
870+
}
871+
>
852872
<div className="blob1" />
853873
<div className="inner">💀 Roast DevDisplay!</div>
854874
</StyledButton>
@@ -860,6 +880,38 @@ const CardSection = () => {
860880
</div>
861881
</div>
862882
</StyledWrapper>
883+
884+
{isModalOpen && (
885+
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50">
886+
<div className="w-full max-w-md rounded-lg bg-gray-800 p-6 text-white">
887+
<div className="mb-4 flex items-center justify-between">
888+
<h2 className="text-xl font-semibold">You Matter! Your Feedback Matter!</h2>
889+
<button onClick={() => setIsModalOpen(false)} className="text-gray-400 hover:text-white">
890+
X
891+
</button>
892+
</div>
893+
894+
<iframe
895+
src={modalContent}
896+
width="100%"
897+
height="500px"
898+
frameBorder="0"
899+
title="Tally Form"
900+
className="rounded-lg"
901+
></iframe>
902+
903+
<div className="mt-4 flex justify-end">
904+
<button
905+
type="button"
906+
onClick={() => setIsModalOpen(false)}
907+
className="rounded-lg bg-gray-700 px-4 py-2 text-white transition-colors hover:bg-gray-600"
908+
>
909+
Close
910+
</button>
911+
</div>
912+
</div>
913+
</div>
914+
)}
863915
</section>
864916
);
865917
};

0 commit comments

Comments
 (0)