From 9e6da7aae9dd9176120a0c173961430b5d7a74eb Mon Sep 17 00:00:00 2001 From: ashmit-coder Date: Wed, 10 Apr 2024 10:20:51 +0530 Subject: [PATCH 1/3] added next lint checking workflow --- .github/workflows/next-lint-check.yml | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/next-lint-check.yml diff --git a/.github/workflows/next-lint-check.yml b/.github/workflows/next-lint-check.yml new file mode 100644 index 00000000..f5c44e48 --- /dev/null +++ b/.github/workflows/next-lint-check.yml @@ -0,0 +1,31 @@ +name: Next.js Linting Check + +on: + pull_request: + branches: + - main + - master + push: + branches: + - main + - master + +jobs: + lint: + name: Linting with Next.js + runs-on: ubuntu-latest + + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: '14' + + - name: Install Dependencies + run: npm ci + + - name: Run Linting + run: npm run lint From 6ca9306c72d0ddc6be2e36f4078917c81ada076d Mon Sep 17 00:00:00 2001 From: ashmit-coder Date: Wed, 10 Apr 2024 15:14:26 +0530 Subject: [PATCH 2/3] corrected workflow --- .github/workflows/next-lint-check.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/next-lint-check.yml b/.github/workflows/next-lint-check.yml index f5c44e48..918c8391 100644 --- a/.github/workflows/next-lint-check.yml +++ b/.github/workflows/next-lint-check.yml @@ -25,7 +25,7 @@ jobs: node-version: '14' - name: Install Dependencies - run: npm ci + run: npm install - name: Run Linting run: npm run lint From 5e26f9f2d19a41c6038b81ba9a80d4ce8a839bba Mon Sep 17 00:00:00 2001 From: Ashmit Personal Date: Thu, 18 Jul 2024 12:14:08 +0530 Subject: [PATCH 3/3] added prettier lint --- .github/workflows/next-lint-check.yml | 6 +- .prettierignore | 9 +- components/About/about.js | 128 ++++--- components/Agenda/agenda.js | 192 ++++++----- components/Buttons/button.js | 22 +- components/Cards/ticketCards.js | 28 +- components/Countdown/countdown.js | 220 ++++++------ components/Dropdown/dropdown.js | 124 +++---- components/Footer/footer.js | 52 +-- components/Form/Cfp/stepFour.js | 28 +- components/Form/Cfp/stepOne.js | 23 +- components/Form/Cfp/stepThree.js | 48 +-- components/Form/Cfp/stepTwo.js | 23 +- components/Form/paper.js | 84 ++--- components/Form/select.js | 4 +- components/Form/subscription.js | 41 +-- components/Header/header.js | 102 +++--- components/Navbar/navDrop.js | 117 ++++--- components/Navbar/navbar.js | 286 ++++++++-------- components/PastEditionCard/index.js | 51 +-- components/Select/select.js | 4 +- components/Slider/slider.js | 56 ++-- components/Speaker/speaker.js | 71 ++-- components/Sponsors/sponsors.js | 78 +++-- components/Typography/heading.js | 128 +++---- components/Typography/paragraph.js | 40 +-- components/Venue/venue.js | 78 +++-- components/announcement.js | 10 +- components/illustration/activityLoader.js | 2 +- components/illustration/arrow.js | 42 +-- components/illustration/cancel.js | 100 +++--- components/illustration/dropdown.js | 28 +- components/illustration/hamburger.js | 87 ++--- components/illustration/plus.js | 44 ++- config/city-lists.json | 90 +++-- config/editions.json | 10 +- config/links.json | 96 +++--- config/speakers.json | 128 +++---- next.config.js | 10 +- package-lock.json | 16 + package.json | 4 +- pages/_app.js | 20 +- pages/api/hello.js | 2 +- pages/editions/index.js | 46 +-- pages/index.js | 386 ++++++++++++---------- pages/venue/[id].js | 153 +++++---- postcss.config.js | 2 +- styles/globals.css | 215 ++++++------ tailwind.config.js | 66 ++-- 49 files changed, 1944 insertions(+), 1656 deletions(-) diff --git a/.github/workflows/next-lint-check.yml b/.github/workflows/next-lint-check.yml index 918c8391..388aaa34 100644 --- a/.github/workflows/next-lint-check.yml +++ b/.github/workflows/next-lint-check.yml @@ -3,11 +3,9 @@ name: Next.js Linting Check on: pull_request: branches: - - main - master push: branches: - - main - master jobs: @@ -17,12 +15,12 @@ jobs: steps: - name: Checkout Repository - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Use Node.js uses: actions/setup-node@v3 with: - node-version: '14' + node-version: '20' - name: Install Dependencies run: npm install 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