Skip to content

Commit

Permalink
Merge branch 'master' into add/feat-add-render
Browse files Browse the repository at this point in the history
  • Loading branch information
toffee-k21 authored Dec 19, 2024
2 parents 744bcc9 + 1ab3848 commit 9dae518
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 26 deletions.
2 changes: 1 addition & 1 deletion components/Form/Cfp/stepThree.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function StepThree({ setStep, setForm, data }) {
const [value, setValue] = useState({});
useEffect(() => {
setForm({ ...data, ...value});
}, [value]);
}, [value, data, setForm]);
return (
<form className="mt-3 w-[30rem] lg:w-[auto]" onSubmit={(e) => setStep(e, 4)}>
<h1 className="text-white font-bold text-4xl lg:text-3xl">
Expand Down
2 changes: 1 addition & 1 deletion components/Form/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function Dropdown({ options, title, setValue, multi ,dataTest}) {
} else {
setValue(selectedOption.value);
}
}, [selectedOption]);
}, [selectedOption, multi, setValue]);
return (
<div className="relative inline-block w-full">
<Select
Expand Down
9 changes: 3 additions & 6 deletions components/Navbar/navDrop.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const NavDrop = forwardRef((props, ref)=> {
const {setDrop}=props;
const [show, setShow] = useState(null);
return (
<div ref ={ref} className='absolute ml-[-20px] top-16 w-full bg-[#1B1130]'>
<div ref ={ref} className='z-[99] absolute left-0 top-[74px] w-full h-screen bg-[#1B1130]/90 backdrop-filter backdrop-blur-md'>
<div className='flex flex-col p-5 pb-8 w-full'>
{links.map((link) => {
return (
Expand All @@ -22,13 +22,10 @@ const NavDrop = forwardRef((props, ref)=> {
>
{link.subMenu ? (
<div>
<div className='flex items-center justify-between'
>
<div className='flex'>
<div className='text-white'>{link.title}</div>
<Dropdown
className={`transition-transform duration-700 ${
show === link.title ? 'rotate-0' : 'rotate-[-90deg]'
}`}
className={`transition-transform duration-700`}
/>
</div>
{show && show === link.title && (
Expand Down
4 changes: 2 additions & 2 deletions components/Navbar/navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function Navbar() {
};

return (
<div className='flex justify-center items-center sticky top-0 z-[99] text-white'>
<div className={`flex justify-center items-center fixed w-full backdrop-blur ${ drop && 'bg-[#1B1130]/90'} top-0 z-[99] text-white`}>
<div className='w-[1131px]'>
<div className='p-5 flex justify-between h-[75px] w-full items-center'>
<div className='flex items-center sm:justify-between sm:w-full' data-test="nav-Home">
Expand All @@ -86,7 +86,7 @@ function Navbar() {
<Cancel />
</button>
) : (
<button >
<button>
<Hamburger ref={svg} />
</button>
)}
Expand Down
25 changes: 17 additions & 8 deletions components/Venue/venue.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,28 @@ import React from 'react';
import Link from 'next/link';
import Image from 'next/image';

export function isEventEnded(date){
const eventDate = date.split(" ");
const month = eventDate[0];
const year = eventDate[eventDate.length-1];
const startDay = eventDate[1].split("-")[0];
return new Date(`${startDay} ${month} ${year}`) < Date.now()
export function getEventStatus(date){
const today = new Date();
const event = new Date(date);

if (event.toDateString() === today.toDateString()) {
return "Ongoing";
} else if (event > today) {
return "Upcoming";
} else {
return "Ended";
}
}

export function isEventEnded(date){
return getEventStatus(date) === "Ended";
}

function Venue({ className, city }) {

const eventEnded = isEventEnded(city.date);
const textColor = eventEnded ? "text-white": "text-white";
const eventStatus = getEventStatus(city.date);

return (
<Link href={`/venue/${city.name}`}>
Expand All @@ -37,8 +46,8 @@ function Venue({ className, city }) {
{city.name=='Online'?<span className='text-lg font-bold'>{city.name} {city.country}</span>:<span className='text-lg font-bold'>{city.country}, {city.name}</span>}
</div>
<div className='flex align-end flex-row justify-between pt-2'>
<div className='inline-block border border-gray-400 rounded-lg py-1 px-2 text-center'>{city.date}</div>
<span className=' text-white flex align-middle pt-2' style={{ fontSize: ".9em" }}>{eventEnded ? "ENDED" : ""}</span>
<div className='inline-block border border-gray-400 rounded-lg py-1 px-2 text-center sm:text-sm text-base'>{city.date}</div>
<span className=' text-white flex align-middle pt-2 sm:text-[0.8rem] sm:leading-4 text-base'>{eventStatus}</span>
</div>
</div>
</div>
Expand Down
8 changes: 4 additions & 4 deletions config/city-lists.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
{
"name": "Online",
"country": " Edition",
"date": "30th October 2024",
"date": "October 30, 2024",
"cfpdate":"Not announced yet",
"description": "Join us for the AsyncAPI Online Conference Edition as the community unites across the globe to share experiences, collaborate, and foster meaningful connections.",
"img": "/img/testMic.webp",
"address": "AsyncAPI YouTube Channel",
"map": "https://www.youtube.com/live/F9wHxd-v2f0?si=PT8BuAUKNmoLHRiM",
"map": "https://www.youtube.com/playlist?list=PLbi1gRlP7pijItMBmw9SeeyWxuEa3jLR2",
"sponsors": [
"/img/apidays.png"
],
Expand All @@ -21,7 +21,7 @@
{
"name": "Helsinki",
"country": "Finland",
"date": "May 29 2024",
"date": "May 29, 2024",
"cfpdate":"Not announced yet",
"description": "Join us in Helsinki for the AsyncAPI Conference, where we will explore all things AsyncAPI and connect physical and digital worlds. Get excited as we delve into sustainable APIs for the Era of AI, Data Platforms, and Quantum Computing!.",
"img": "/img/finland.webp",
Expand Down Expand Up @@ -67,6 +67,6 @@
"ticket": "https://ticket.apidays.global/event/apidays-paris-2024/f8f61349-4f78-4bba-a162-68d598833116/cart?coupon=ASYNCAPICONF",
"isFree": true,
"cfp": false,
"ended": false
"ended": true
}
]
7 changes: 6 additions & 1 deletion config/links.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,15 @@
"title": "Online Conf Slides",
"ref": "https://drive.google.com/drive/folders/1gw_kr6mLX5lITe_DHG94pGUOVYYS0DjY?usp=drive_link",
"target": "_blank"
},
{
"title": "Paris Slides",
"ref": "https://drive.google.com/drive/folders/1MBqecV7Q__tLIciF2vaPvwG5gV4RxcI_?usp=drive_link",
"target": "_blank"
}


]
}

]
]
5 changes: 3 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pages/venue/[id].js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function Venue({ city }) {

<Paragraph className='mt-[24px]' textColor={textColor}>{city.description}</Paragraph>

<Heading typeStyle='lg' className={`${textColor} mt-[24px] hover:underline`}>
<Heading typeStyle='lg' className={`${textColor} mt-[24px] underline`}>
<a href={city.map} target='_blank' rel="noreferrer">
{city.address}
</a>
Expand Down

0 comments on commit 9dae518

Please sign in to comment.