diff --git a/client/package.json b/client/package.json index ef352ae..2a1cf88 100644 --- a/client/package.json +++ b/client/package.json @@ -13,7 +13,9 @@ "react-router-dom": "^6.17.0", "react-scripts": "5.0.1", "styled-components": "^6.1.0", - "typescript": "^5.2.2" + "typescript": "^5.2.2", + "react-modal": "^3.14.4", + "@types/react-modal": "^3.13.1" }, "scripts": { "build:css": "postcss src/index.css -o src/tailwind.css", diff --git a/client/src/App.tsx b/client/src/App.tsx index 8b7d904..10b1aed 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -9,7 +9,7 @@ import Footer from './components/Footer'; import Bylaws from './components/Bylaws'; import Sponsors from './components/Sponsors'; import MeetBoard from './components/Meet-Board'; -import ComingSoon from './components/ComingSoon'; +/* import ComingSoon from './components/ComingSoon'; */ import JoinMCDi from './components/JoinMCDi'; const App: React.FC = () => { diff --git a/client/src/components/Header.tsx b/client/src/components/Header.tsx index 8fb088e..2c6afb4 100644 --- a/client/src/components/Header.tsx +++ b/client/src/components/Header.tsx @@ -1,6 +1,7 @@ import React, { useState } from 'react'; import { Link } from 'react-router-dom'; import { motion, AnimatePresence } from 'framer-motion'; +import Modal from 'react-modal'; const Header: React.FC = () => { const [isMenuOpen, setIsMenuOpen] = useState(false); @@ -114,19 +115,52 @@ const DropdownItem: React.FC = ({ href, children }) => ( ); -const DonateButton: React.FC<{ onClick?: () => void }> = ({ onClick }) => ( - - - -); + + +

Donate to MCDi

+ + +
+ + ); +}; export default Header; diff --git a/client/src/components/JoinMCDi.tsx b/client/src/components/JoinMCDi.tsx index 41f0d40..1125823 100644 --- a/client/src/components/JoinMCDi.tsx +++ b/client/src/components/JoinMCDi.tsx @@ -1,5 +1,6 @@ -import React from 'react'; +import React, { useState, useEffect } from 'react'; import { motion } from 'framer-motion'; +import Modal from 'react-modal'; interface CardProps { title: string; @@ -18,14 +19,14 @@ const Card: React.FC = ({ title, content, className }) => ( ); -const JoinButton: React.FC = () => ( +const JoinButton: React.FC<{ onClick: () => void }> = ({ onClick }) => ( + + + + + {isLoading && ( +
+
+
+ )} ); }; diff --git a/client/src/index.css b/client/src/index.css index 6a7f6e2..71fa7b0 100644 --- a/client/src/index.css +++ b/client/src/index.css @@ -107,3 +107,26 @@ html { .animate-fadeIn { animation: fadeIn 0.5s ease-in-out; } + +/* Modal styles */ +.modal { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + background-color: white; + padding: 20px; + border-radius: 8px; + width: 60vw; + height: 60vh; + overflow-y: hidden; +} + +.overlay { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.75); +} \ No newline at end of file