diff --git a/.github/workflows/next-lint-check.yml b/.github/workflows/next-lint-check.yml new file mode 100644 index 00000000..388aaa34 --- /dev/null +++ b/.github/workflows/next-lint-check.yml @@ -0,0 +1,29 @@ +name: Next.js Linting Check + +on: + pull_request: + branches: + - master + push: + branches: + - master + +jobs: + lint: + name: Linting with Next.js + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '20' + + - name: Install Dependencies + run: npm install + + - name: Run Linting + run: npm run lint diff --git a/.prettierignore b/.prettierignore index fa29cdff..04a0a78e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,8 @@ -** \ No newline at end of file +.next +node_modules +.nvmrc +CODE_OF_CONDUCT.md +CODEOWNERS +CONTRIBUTING.md +README.md +.github \ No newline at end of file diff --git a/components/About/about.js b/components/About/about.js index 02cf56f9..ba8512f4 100644 --- a/components/About/about.js +++ b/components/About/about.js @@ -1,58 +1,78 @@ /* eslint-disable react/no-unescaped-entities */ -import React from 'react' -import Heading from '../Typography/heading'; -import Paragraph from '../Typography/paragraph'; -import Button from '../Buttons/button'; -import Image from 'next/image'; +import React from "react"; +import Heading from "../Typography/heading"; +import Paragraph from "../Typography/paragraph"; +import Button from "../Buttons/button"; +import Image from "next/image"; function About() { - return ( -
-
-
-
-
-
-
-
About The Event
-
- - AACoT'24 - - - The AsyncAPI Conf on Tour is an official event created by the AsyncAPI - Initiative. This conference is aimed primarily at the community to share and - exchange experiences between existing users and new members. We plan to - integrate new members into the community and expand their knowledge about - the project. - - - We are currently looking for sponsors, for more details please read our Sponsorship Prospectus. - -
- - - - - - -
-
-
-
- ); + return ( +
+
+
+
+
+
+
+ About The Event +
+
+ + AACoT'24 + + + The AsyncAPI Conf on Tour is an official event created by the + AsyncAPI Initiative. This conference is aimed primarily at the + community to share and exchange experiences between existing users + and new members. We plan to integrate new members into the community + and expand their knowledge about the project. + + + We are currently looking for sponsors, for more details please read + our Sponsorship Prospectus. + + +
+
+
+ ); } -export default About \ No newline at end of file +export default About; diff --git a/components/Agenda/agenda.js b/components/Agenda/agenda.js index db9ba536..f0687b66 100644 --- a/components/Agenda/agenda.js +++ b/components/Agenda/agenda.js @@ -1,84 +1,118 @@ -import React from 'react' -import Heading from '../Typography/heading' -import Paragraph from '../Typography/paragraph' -import Image from 'next/image' +import React from "react"; +import Heading from "../Typography/heading"; +import Paragraph from "../Typography/paragraph"; +import Image from "next/image"; function Agenda({ city }) { return ( -
-
- - - Agenda - - {!city.agenda &&
- - Agenda Coming Soon - Stay Tuned! - -
} -
- - {city.agenda &&
- - {city.date} - - -
- {city.agenda.map((talk) => { - return
- - {talk.time} - -
-
- - {talk.type} - - - {talk.session} - -
- {talk.speaker && typeof talk.speaker === 'number' ?
-
- {city.speakers[talk.speaker -
-
- - {city.speakers[talk.speaker-1].name} - - - {city.speakers[talk.speaker-1].title} - -
-
:
} - {talk.speaker && typeof talk.speaker === 'object' &&
- {talk.speaker.map((speak, i) =>
-
-
- {city.speakers[speak -
-
- - {city.speakers[speak-1].name} - - - {city.speakers[speak-1].title} - -
-
-
) - } -
} -
-
- })} -
-
} -
- ); +
+
+ Agenda + {!city.agenda && ( +
+ + Agenda Coming Soon - Stay Tuned! + +
+ )} +
+ + {city.agenda && ( +
+ + {city.date} + + +
+ {city.agenda.map((talk) => { + return ( +
+ {talk.time} +
+
+ + {talk.type} + + + {talk.session} + +
+ {talk.speaker && typeof talk.speaker === "number" ? ( +
+
+ {city.speakers[talk.speaker +
+
+ + {city.speakers[talk.speaker - 1].name} + + + {city.speakers[talk.speaker - 1].title} + +
+
+ ) : ( +
+ )} + {talk.speaker && typeof talk.speaker === "object" && ( +
+ {talk.speaker.map((speak, i) => ( +
+
+
+ {city.speakers[speak +
+
+ + {city.speakers[speak - 1].name} + + + {city.speakers[speak - 1].title} + +
+
+
+ ))} +
+ )} +
+
+ ); + })} +
+
+ )} +
+ ); } -export default Agenda \ No newline at end of file +export default Agenda; diff --git a/components/Buttons/button.js b/components/Buttons/button.js index 9cd32e7e..0436c4d6 100644 --- a/components/Buttons/button.js +++ b/components/Buttons/button.js @@ -1,14 +1,16 @@ -import React from 'react' +import React from "react"; -function Button({className, children, overlay, onClick, type, disabled}) { +function Button({ className, children, overlay, onClick, type, disabled }) { return ( - - ); + + ); } -export default Button \ No newline at end of file +export default Button; diff --git a/components/Cards/ticketCards.js b/components/Cards/ticketCards.js index 7589c054..e9a32a07 100644 --- a/components/Cards/ticketCards.js +++ b/components/Cards/ticketCards.js @@ -1,16 +1,24 @@ -import React from 'react' -import Button from '../Buttons/button' +import React from "react"; +import Button from "../Buttons/button"; -function TicketCards({className, city}) { +function TicketCards({ className, city }) { return ( -
-
-
{city.name}, {city.country}
-
{city.date}
+
+
+
+ {city.name}, {city.country}
-
+
{city.date}
+
+
+ +
- ) + ); } -export default TicketCards \ No newline at end of file +export default TicketCards; diff --git a/components/Countdown/countdown.js b/components/Countdown/countdown.js index 58247b17..2a808f1b 100644 --- a/components/Countdown/countdown.js +++ b/components/Countdown/countdown.js @@ -1,120 +1,122 @@ -import React, { useEffect, useRef, useState } from 'react'; -import Countdown from 'react-countdown'; +import React, { useEffect, useRef, useState } from "react"; +import Countdown from "react-countdown"; const dates = [ - { - name: 'London, UK', - date: 'September 20, 2023', - }, - { - name: 'Madrid, Spain', - date: 'October 19, 2023', - }, - { - name: 'Bangalore, India', - date: 'November 30, 2023', - }, - { - name: 'Paris, France', - date: 'December 6, 2023', - }, + { + name: "London, UK", + date: "September 20, 2023", + }, + { + name: "Madrid, Spain", + date: "October 19, 2023", + }, + { + name: "Bangalore, India", + date: "November 30, 2023", + }, + { + name: "Paris, France", + date: "December 6, 2023", + }, ]; function Countdowns() { - const [selectedIndex, setSelectedIndex] = useState(0); + const [selectedIndex, setSelectedIndex] = useState(0); - const locationRef = useRef(null); - const dateRef = useRef(null); - useEffect(() => { - const intervalId = setInterval(() => { - locationRef.current.classList.remove('hidden'); - locationRef.current.classList.add('home-title'); - dateRef.current.classList.remove('hidden'); - dateRef.current.classList.add('home-title'); - setSelectedIndex((prevIndex) => (prevIndex + 1) % dates.length); - setTimeout(() => { - if(locationRef?.current) { - locationRef.current.classList.remove('home-title'); - locationRef.current.classList.add('hidden'); - } - if(dateRef?.current) { - dateRef.current.classList.remove('home-title'); - dateRef.current.classList.add('hidden'); - } - }, 9900); // Element stays visible for 800 milliseconds - }, 10000); // Toggle visibility every 1500 milliseconds + const locationRef = useRef(null); + const dateRef = useRef(null); + useEffect(() => { + const intervalId = setInterval(() => { + locationRef.current.classList.remove("hidden"); + locationRef.current.classList.add("home-title"); + dateRef.current.classList.remove("hidden"); + dateRef.current.classList.add("home-title"); + setSelectedIndex((prevIndex) => (prevIndex + 1) % dates.length); + setTimeout(() => { + if (locationRef?.current) { + locationRef.current.classList.remove("home-title"); + locationRef.current.classList.add("hidden"); + } + if (dateRef?.current) { + dateRef.current.classList.remove("home-title"); + dateRef.current.classList.add("hidden"); + } + }, 9900); // Element stays visible for 800 milliseconds + }, 10000); // Toggle visibility every 1500 milliseconds - return () => { - clearInterval(intervalId); - }; - }, []); + return () => { + clearInterval(intervalId); + }; + }, []); - const renderer = ({ days, hours, minutes, seconds, completed }) => { - if (completed) { - // Render a completed state - return
-
-
-
-
-
- - Ended - -
-
- } else { - // Render a countdown - return ( -
-
- - {days}: - -
-
- - {hours}: - -
-
- - {minutes}: - -
-
- - {seconds} - -
-
- ); - } - }; - return ( -
-
-
- - {dates[selectedIndex].name} - -
-
-
- -
-
- ); + const renderer = ({ days, hours, minutes, seconds, completed }) => { + if (completed) { + // Render a completed state + return ( +
+
+
+
+
+
+ + Ended + +
+
+ ); + } else { + // Render a countdown + return ( +
+
+ + {days}: + +
+
+ + {hours}: + +
+
+ + {minutes}: + +
+
+ + {seconds} + +
+
+ ); + } + }; + return ( +
+
+
+ + {dates[selectedIndex].name} + +
+
+
+ +
+
+ ); } export default Countdowns; diff --git a/components/Dropdown/dropdown.js b/components/Dropdown/dropdown.js index 958e959e..934d899e 100644 --- a/components/Dropdown/dropdown.js +++ b/components/Dropdown/dropdown.js @@ -1,34 +1,34 @@ -import React, {useState} from 'react'; +import React, { useState } from "react"; function Dropdown({ active, items, setOptions, setOptions2 }) { - const [show, setShow] = useState(false) - return ( -
-
- -
- {/* + const [show, setShow] = useState(false); + return ( +
+
+ +
+ {/* */} - {show && ( -
-
- {items && - items.map((item) => { - return ( -
{ - setOptions(item); - setOptions2(item.lists); - setShow(false); - }} - className={`text-gray-700 block p-4 text-md hover:text-white cursor-pointer navbg`} - role='menuitem' - tabindex='-1' - id='menu-item-0' - > - {item.city} -
- ); - })} -
-
- )} -
- ); + {show && ( +
+
+ {items && + items.map((item) => { + return ( +
{ + setOptions(item); + setOptions2(item.lists); + setShow(false); + }} + className={`text-gray-700 block p-4 text-md hover:text-white cursor-pointer navbg`} + role="menuitem" + tabindex="-1" + id="menu-item-0" + > + {item.city} +
+ ); + })} +
+
+ )} +
+ ); } export default Dropdown; diff --git a/components/Footer/footer.js b/components/Footer/footer.js index 6bf70636..bd4791ca 100644 --- a/components/Footer/footer.js +++ b/components/Footer/footer.js @@ -1,5 +1,5 @@ import React from "react"; -import Image from 'next/image'; +import Image from "next/image"; import Link from "next/link"; function Footer() { @@ -23,24 +23,29 @@ function Footer() { return (
- - company logo - -
- {/* This div helps keep the text centered */} -
- -
-
+ + company logo + +
+ {/* This div helps keep the text centered */} +
+ +
@@ -53,14 +58,19 @@ function Footer() { rel="noreferrer" className="w-12 h-12 rounded-lg border-[1.5px] border-[#556061] flex items-center justify-center hover:border-[#AD20E2] duration-150 ease-in-out" > - {social.name} + {social.name} ); })}
-
+
); } diff --git a/components/Form/Cfp/stepFour.js b/components/Form/Cfp/stepFour.js index 4134e656..3a0fd11c 100644 --- a/components/Form/Cfp/stepFour.js +++ b/components/Form/Cfp/stepFour.js @@ -1,5 +1,5 @@ /* eslint-disable react/no-unescaped-entities */ -import React, {useState} from "react"; +import React, { useState } from "react"; import { toast } from "react-hot-toast"; import axios from "axios"; import ActivityLoader from "../../illustration/activityLoader"; @@ -14,20 +14,20 @@ function StepFour({ setStep, setForm, data }) { axios .post( "https://sheet.best/api/sheets/91aebdc6-66cb-46c2-9c7b-4cdfc7541b56", - data + data, ) .then((res) => { setSubmitting(false); if (res.status === 200) { setDisabled(true); - setStep(e, 'successful') + setStep(e, "successful"); } }) .catch((err) => { setSubmitting(false); toast.error("Failed to submit feedback. Try again", { - duration: '6000' - }); + duration: "6000", + }); }); }; return ( @@ -36,7 +36,9 @@ function StepFour({ setStep, setForm, data }) { Additional Information

- Notes will only be seen by reviewers during the CFP process. Therefore, it is important to use this space to explain any technical requirements or why you are best suited to speak on the subject, etc... + Notes will only be seen by reviewers during the CFP process. Therefore, + it is important to use this space to explain any technical requirements + or why you are best suited to speak on the subject, etc...

@@ -48,9 +50,17 @@ function StepFour({ setStep, setForm, data }) { }} onChange={(e) => setForm({ ...data, AdditionalInfo: e.target.value })} /> - +
- By clicking submit, this means you agree to follow the AsyncAPI Initiative Code of Conduct + By clicking submit, this means you agree to follow the{" "} + + AsyncAPI Initiative Code of Conduct +
setStep(e, 2)}> +
setStep(e, 2)} + >

Let's start with your name

@@ -32,7 +35,7 @@ function StepOne({ setStep, setForm, data }) { }} onChange={(e) => setForm({ ...data, Email: e.target.value })} /> -
Bio
+
Bio