All language subtitles for 016 Adding the New Meetup Form_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

So for this NewMeetup component

we again create a function here a component function

like the NewMeetupPage function.

And of course, as before we need to export this

so that NextJS is able to find this

and then we can render our content here.

Now our content in this case

should be the NewMeetupForum component

which I prepared in advance, which renders a form

with some controls, with some styles attached

using CSS modules here for styling.

I'll come back to that in a second, that is supported

by NextJS out of the box, which is really convenient.

And then here we get that data.

We extract that data, the user entered, with help offer Refs

which has a built in React feature

has nothing to do with NextJS.

And then we basically call a function which we expect to get

on the onAddMeetup prop.

And to that function

we then pass the collected meetup data.

So this object with all the collected data.

And hence now in this newMeetup index JS file here

we can use that component and we can import newMeetupForm

from going up two levels to leave the pages folder diving

into the components folder, Meetups, and then newMeetupForm.

And then we can return newMeetupForm

this component like this if we want to.

Now as I just mentioned, in this component

we do expect that there will be a onAddMeetup prop

which holds a function that we can call.

And hence we might want to prepare

this function here as well.

We can add our addMeetupHandler function

or however you want to name it and then pass a pointer

after this function to the onAddMeetup prop a pointer

and not the result of executing it.

So no parentheses here, because this function

should be executed eventually from inside that component,

when the form is submitted as it turns out.

Here, we then get our enteredMeetupData.

And we can, for example, for the moment

simply log this to the console.

And with that out of the way, if we go back again

we can visit localhost3000/newMeetup

and we see this form again,

not to final styling a bit too wide,

but we see the form.

And if I opened the developer tools here

and I enter test and test, or here, we actually need a URL.

So I will just quickly grab that URL

which I set up for my dummy data, this URL

I'll grab that and use this here Test Address.

And This is a test.

If we enter this data and we click Add Meetup

we see this object logged to the console.

So handling form submission works.

Obviously we're not doing anything with that data.

At this point, we're not navigating away

and we are going to do all these things later

but this again just shows us how we can use pages

and also mix regular React components into those pages.

And then, with that, that's a great start

but now we're already facing a couple of issues here.

We've got a lot of missing functionality, of course.

And for example, we also have no way

for navigating between pages

and we have no general layout around our pages.

Every page takes up the entire width.

We get no header above them.

And that is probably something we want to change.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.