diff --git a/.github/workflows/scripts/mailchimp/package-lock.json b/.github/workflows/scripts/mailchimp/package-lock.json index 7ee7d84f..cc41a360 100644 --- a/.github/workflows/scripts/mailchimp/package-lock.json +++ b/.github/workflows/scripts/mailchimp/package-lock.json @@ -594,4 +594,4 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" } } -} \ No newline at end of file +} diff --git a/.gitignore b/.gitignore index d03866cb..5750c31d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ -<<<<<<< HEAD # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies @@ -31,8 +30,5 @@ yarn-error.log* # vercel .vercel -======= -node_modules -dist -.DS_Store ->>>>>>> 01b055cce86f54da76e412cdfbbd113702f986e4 + +credentials.json \ No newline at end of file diff --git a/README.md b/README.md index 7706fa76..e0f6672f 100644 --- a/README.md +++ b/README.md @@ -51,4 +51,4 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d -This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! \ No newline at end of file +This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! diff --git a/components/Cards/ticketCards.js b/components/Cards/ticketCards.js deleted file mode 100644 index 7589c054..00000000 --- a/components/Cards/ticketCards.js +++ /dev/null @@ -1,16 +0,0 @@ -import React from 'react' -import Button from '../Buttons/button' - -function TicketCards({className, city}) { - return ( -
-
-
{city.name}, {city.country}
-
{city.date}
-
-
-
- ) -} - -export default TicketCards \ No newline at end of file diff --git a/components/Form/Cfp/stepFour.js b/components/Form/Cfp/stepFour.js index 4134e656..86c8dbb6 100644 --- a/components/Form/Cfp/stepFour.js +++ b/components/Form/Cfp/stepFour.js @@ -8,12 +8,13 @@ import Button from "../../Buttons/button"; function StepFour({ setStep, setForm, data }) { const [submitting, setSubmitting] = useState(false); const [disabled, setDisabled] = useState(false); + const onSubmit = (e) => { e.preventDefault(); setSubmitting(true); axios .post( - "https://sheet.best/api/sheets/91aebdc6-66cb-46c2-9c7b-4cdfc7541b56", + `/api/speakers/register`, data ) .then((res) => { @@ -26,7 +27,7 @@ function StepFour({ setStep, setForm, data }) { .catch((err) => { setSubmitting(false); toast.error("Failed to submit feedback. Try again", { - duration: '6000' + duration: '5600' }); }); }; @@ -52,20 +53,19 @@ function StepFour({ setStep, setForm, data }) {
By clicking submit, this means you agree to follow the AsyncAPI Initiative Code of Conduct
-
+
!disabled && setStep(null, 3)} > Back +
diff --git a/components/Form/Cfp/stepOne.js b/components/Form/Cfp/stepOne.js index 07b83b20..2086f073 100644 --- a/components/Form/Cfp/stepOne.js +++ b/components/Form/Cfp/stepOne.js @@ -53,7 +53,7 @@ function StepOne({ setStep, setForm, data }) { onChange={(e) => setForm({ ...data, Social: e.target.value })} /> diff --git a/components/Form/Cfp/stepThree.js b/components/Form/Cfp/stepThree.js index 69d78fb9..8afdbde8 100644 --- a/components/Form/Cfp/stepThree.js +++ b/components/Form/Cfp/stepThree.js @@ -4,10 +4,6 @@ import Select from "../select"; import Button from "../../Buttons/button"; const options1 = [ - { - value: "Lightning talk", - label: "Lightning talk(5mins)", - }, { value: "Session", label: "Session(20 - 25mins)", @@ -37,7 +33,7 @@ function StepThree({ setStep, setForm, data }) { const [value, setValue] = useState({}); useEffect(() => { setForm({ ...data, ...value}); - }, [data, setForm, value]); + }, [value]); return (
setStep(e, 4)}>

@@ -63,21 +59,21 @@ function StepThree({ setStep, setForm, data }) { setValue={(val) => setValue({...value, Level: val})} multi={false} /> -
- setStep(null, 1)} +
+ setStep(null, 2)} > Back - - + + +
- ); } diff --git a/components/Form/Cfp/stepTwo.js b/components/Form/Cfp/stepTwo.js index 2f42c3a2..cd504cdd 100644 --- a/components/Form/Cfp/stepTwo.js +++ b/components/Form/Cfp/stepTwo.js @@ -30,9 +30,9 @@ function StepTwo({ setStep, setForm, data }) { border: "1px solid #E50E99", }} onChange={(e) => setForm({ ...data, Description: e.target.value })} /> -
+
setStep(null, 1)} > Back @@ -40,7 +40,7 @@ function StepTwo({ setStep, setForm, data }) {
diff --git a/components/Form/paper.js b/components/Form/paper.js index 82c35369..3804d798 100644 --- a/components/Form/paper.js +++ b/components/Form/paper.js @@ -4,7 +4,7 @@ import StepOne from "./Cfp/stepOne"; import StepTwo from "./Cfp/stepTwo"; import StepThree from './Cfp/stepThree'; import StepFour from './Cfp/stepFour'; - +import cfpData from "../../config/cfp-data.json" const fields = [ { title: "Your Information", @@ -45,10 +45,11 @@ function Paper() { useEffect(() => { setHeight(confetiRef.current.clientHeight); setWidth(confetiRef.current.clientWidth); + }, []); const stepOne = let view = stepOne - if (step === 4) { + if (step === 1) { view = stepOne } if (step === 2) { @@ -76,7 +77,9 @@ function Paper() { } return ( -
+
+
+

Submit your talk!

@@ -87,7 +90,8 @@ function Paper() {

P.S. We do not offer travel scholarships or financial support.

-

Application closes on Oct 19

+

Application closes on {cfpData.CallEndDate}

+
-
+
{fields.map((field, i) => { const index = i + 1 ; return (
-
-

+
+

{field.title}

{field.description}

@@ -124,7 +128,7 @@ function Paper() { })}

-
+

{typeof(step) === 'number' && `Step ${step}/4`}

{view}
+
) } diff --git a/components/Form/select.js b/components/Form/select.js index b390e7ba..d5e5a772 100644 --- a/components/Form/select.js +++ b/components/Form/select.js @@ -45,7 +45,7 @@ function Dropdown({ options, title, setValue, multi }) { } else { setValue(selectedOption.value); } - }, [multi, selectedOption, setValue]); + }, [selectedOption]); return (