Skip to content

Commit

Permalink
Merge branch 'master' into 455-sticky-menu
Browse files Browse the repository at this point in the history
  • Loading branch information
AceTheCreator authored Dec 17, 2024
2 parents 96a2787 + c380024 commit b645d53
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 16 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
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
4 changes: 2 additions & 2 deletions config/city-lists.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"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",
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
2 changes: 1 addition & 1 deletion config/speakers.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@
},
{
"time": "1:50 PM CEST - 2:40 PM CEST",
"session": "Streaming Data Events Into An Event Mesh Infrastructure Using AsyncAPI",
"session": "Streaming Data Events Into An AI Cognitive Event Mesh Using AsyncAPI",
"speaker": [9,10],
"type": "Technical Speaker"
},
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/Landing.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe("Landing Page Tests", () => {
cy.getTestData("subscribe-button").invoke("removeAttr", "target").click();

cy.origin("https://www.asyncapi.com/newsletter", () => {
cy.url().should("eq", "https://www.asyncapi.com/newsletter");
cy.url().should("match", /https:\/\/www\.asyncapi\.com\/[a-z]{2}\/newsletter/);
});
});
});
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.

0 comments on commit b645d53

Please sign in to comment.