All language subtitles for 006 Working on the _All Events_ Page_Downloadly.ir_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
en English
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
fa Persian Download
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
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:02,090 --> 00:00:05,080 So for the all events page 2 00:00:05,080 --> 00:00:08,220 the question is what we wanna to do there? 3 00:00:08,220 --> 00:00:11,500 And I would say that we probably still want 4 00:00:11,500 --> 00:00:14,170 to statically generate this page. 5 00:00:14,170 --> 00:00:17,410 So that we wanna fetch all the data in advance 6 00:00:17,410 --> 00:00:20,563 with get static props. 7 00:00:20,563 --> 00:00:23,370 Therefore, just us before on this page 8 00:00:23,370 --> 00:00:26,440 I'll export my async function, 9 00:00:26,440 --> 00:00:28,880 get static props 10 00:00:28,880 --> 00:00:31,910 and then in there we wanna get all the events 11 00:00:31,910 --> 00:00:34,280 and expose them full props 12 00:00:34,280 --> 00:00:36,763 to this all events page component. 13 00:00:37,820 --> 00:00:38,818 Now we do of course have 14 00:00:38,818 --> 00:00:43,570 this get all events function in API util. 15 00:00:43,570 --> 00:00:45,450 So we can utilize that 16 00:00:45,450 --> 00:00:50,280 and import get all events from not from dummy data, 17 00:00:50,280 --> 00:00:53,200 but from helpers API util 18 00:00:54,220 --> 00:00:56,410 and then go down there 19 00:00:56,410 --> 00:00:59,370 and get access to all events by awaiting 20 00:00:59,370 --> 00:01:02,120 the result of get all events. 21 00:01:02,120 --> 00:01:05,230 And then we return an object with a props key 22 00:01:05,230 --> 00:01:09,620 where I have my events which hold my events 23 00:01:09,620 --> 00:01:10,823 which I fetched here, 24 00:01:11,700 --> 00:01:13,193 simple like that. 25 00:01:14,160 --> 00:01:15,400 And now, since we exposed 26 00:01:15,400 --> 00:01:18,480 that full props We should expect props here. 27 00:01:18,480 --> 00:01:21,433 And now you use the events from the props. 28 00:01:22,400 --> 00:01:26,610 So here I'll set events equal to prop start events 29 00:01:26,610 --> 00:01:30,650 or alternatively we use object destructuring 30 00:01:30,650 --> 00:01:32,133 which is what I will do here. 31 00:01:33,500 --> 00:01:36,280 Now, we still need to use router hook here 32 00:01:36,280 --> 00:01:39,960 because here we're not using it to fetch some id 33 00:01:39,960 --> 00:01:43,050 or dynamic path segment value 34 00:01:43,050 --> 00:01:46,470 but instead we're using it for programmatic navigation 35 00:01:46,470 --> 00:01:48,320 which I still wanna enable here. 36 00:01:48,320 --> 00:01:50,163 So that stays the way it is. 37 00:01:51,330 --> 00:01:54,130 Now we can consider revalidating 38 00:01:54,130 --> 00:01:55,650 this page from time to time 39 00:01:55,650 --> 00:01:58,370 to make sure that we pick up new events. 40 00:01:58,370 --> 00:02:00,180 I think that makes a lot of sense 41 00:02:00,180 --> 00:02:02,550 so we should add revalidate here 42 00:02:02,550 --> 00:02:05,910 and then maybe set this to 60 seconds 43 00:02:05,910 --> 00:02:07,450 so that every minute 44 00:02:07,450 --> 00:02:09,310 if a new request is coming in, 45 00:02:09,310 --> 00:02:11,563 we regenerate this page. 46 00:02:12,470 --> 00:02:14,100 Now with that 47 00:02:14,100 --> 00:02:19,100 if I reload this again works just fine 48 00:02:20,080 --> 00:02:22,300 now, it's pregenerated though 49 00:02:22,300 --> 00:02:23,930 which is why in the page source 50 00:02:23,930 --> 00:02:26,363 we have all that event data. 51 00:02:28,040 --> 00:02:30,200 So that also works. 52 00:02:30,200 --> 00:02:32,470 Now,last but not least let's work 53 00:02:32,470 --> 00:02:35,080 on the slug on this slug page 54 00:02:35,080 --> 00:02:37,360 on this catch all page. 55 00:02:37,360 --> 00:02:39,700 That could be a bit more tricky 56 00:02:39,700 --> 00:02:41,500 because here we're catching 57 00:02:41,500 --> 00:02:45,903 multiple dynamic segments, multiple parameters. 4085

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