From 4a391274076c9163cfcc3cd04bf4f6a540f6f57a Mon Sep 17 00:00:00 2001 From: Hariharan Date: Sat, 27 Apr 2024 01:44:59 +0530 Subject: [PATCH] Optimized modal for mobile view --- src/components/events/EventModal.jsx | 19 ++++++++++++------- src/lib/eventsDemoData.js | 7 +++---- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/src/components/events/EventModal.jsx b/src/components/events/EventModal.jsx index 395ad5d..edfcf86 100644 --- a/src/components/events/EventModal.jsx +++ b/src/components/events/EventModal.jsx @@ -5,6 +5,7 @@ import { FaLocationDot, FaSpider } from "react-icons/fa6"; import { RiCalendarEventFill } from "react-icons/ri"; import { MdVideoChat } from "react-icons/md"; import { CalendarClock } from "lucide-react" +import { IoIosCloseCircle } from "react-icons/io"; import { useEffect } from "react" import EventType from "./EventType" import Link from "next/link" @@ -64,17 +65,21 @@ export default function EventModal ({ event, initial, handleClose }) { onClick = {handleClose} > e.stopPropagation()} > -
+
+ {/* close button */} + + +
- -
+ +

{title}


-

{body}

+

{body}

{resources ? -
+

Resources

    {resources.map(r =>
  • {r}
  • )} diff --git a/src/lib/eventsDemoData.js b/src/lib/eventsDemoData.js index fec8ca8..21e99bf 100644 --- a/src/lib/eventsDemoData.js +++ b/src/lib/eventsDemoData.js @@ -19,9 +19,8 @@ export const demoEvents = [ location: 'Nitk LHC-A', link: 'https://www.google.com', cems_link: 'https://www.google.com', - body: 'Dive deep into the world of algorithms at the Algorithm Workshop 2024. This hands-on workshop will cover a range of algorithms, from fundamentals to advanced techniques.', + body: 'Dive deep into the world of algorithms at the Algorithm Workshop 2024. This hands-on workshop will cover a range of algorithms, from fundamentals to advanced techniques. Lorem ipsum, dolor sit amet consectetur adipisicing elit. Amet vel eos eaque facilis, soluta natus adipisci exercitationem nisi nesciunt ullam molestias. Deleniti unde quasi a illo repellendus debitis libero porro.', cover_image: 'https://source.unsplash.com/400x400/?algorithms', - resources: ['Interactive Coding Sessions', 'Q&A with Experts', 'Algorithm Challenges'], }, { id: 3, @@ -70,9 +69,9 @@ export const demoEvents = [ location: 'Nitk CDS, National Institute of Technology, Karnataka, Surathkal', link: 'https://www.google.com', cems_link: 'https://www.google.com', - body: 'Explore the forefront of quantum computing at the Quantum Algorithms Symposium 2024. Dive into discussions on quantum algorithms, participate in live experiments, and gain insights into the future of computation.', + body: 'Explore the forefront of quantum computing at the Quantum Algorithms Symposium 2024. Dive into discussions on quantum algorithms, participate in live experiments, and gain insights into the future of computation. Lorem ipsum, dolor sit amet consectetur adipisicing elit. Amet vel eos eaque facilis, soluta natus adipisci exercitationem nisi nesciunt ullam molestias. Deleniti unde quasi a illo repellendus debitis libero porro.', cover_image: 'https://source.unsplash.com/400x400/?quantum-computing', - resources: ['Quantum Coding Challenges', 'Expert Panels', 'Hands-on Quantum Experiments'], + resources: ['Quantum Coding Challenges', 'Expert Panels', 'Hands-on Quantum Experiments', 'Hands-on Quantum Experiments', 'Hands-on Quantum Experiments', 'Hands-on Quantum Experiments', 'Hands-on Quantum Experiments', 'Hands-on Quantum Experiments', 'Hands-on Quantum Experiments', 'Hands-on Quantum Experiments'], }, { id: 7,