Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:02,160 --> 00:00:04,939
So let's now work on this all events page.
2
00:00:04,939 --> 00:00:08,930
So on this index.js file in the events folder.
3
00:00:08,930 --> 00:00:11,300
Here, we want to render all events,
4
00:00:11,300 --> 00:00:14,460
not filtered, not featured, all events.
5
00:00:14,460 --> 00:00:18,080
And therefore, of course, we want to get all events.
6
00:00:18,080 --> 00:00:21,710
So here we grab all our events,
7
00:00:21,710 --> 00:00:24,670
by reaching out to get all events,
8
00:00:24,670 --> 00:00:26,440
which is another helper function
9
00:00:26,440 --> 00:00:29,580
defined in the dummy-data.js file.
10
00:00:29,580 --> 00:00:32,360
Here I have the get all events function,
11
00:00:32,360 --> 00:00:36,253
which returns the entire dummy events events array.
12
00:00:37,370 --> 00:00:39,700
So here we call that, and in order to call it,
13
00:00:39,700 --> 00:00:43,071
we need to import it from dummy data.
14
00:00:43,071 --> 00:00:45,400
Now that we get the events here,
15
00:00:45,400 --> 00:00:48,750
we wanna render a list of those events.
16
00:00:48,750 --> 00:00:52,720
And that is where we can reuse our event list component.
17
00:00:52,720 --> 00:00:56,180
So at the top, we just need to import event list
18
00:00:56,180 --> 00:00:59,280
from and then go up two levels,
19
00:00:59,280 --> 00:01:03,390
dive into components, events, event list,
20
00:01:03,390 --> 00:01:07,400
and then simply output this event list component again here.
21
00:01:07,400 --> 00:01:12,400
Event, oops, event list, like this.
22
00:01:12,470 --> 00:01:15,960
And to event list, we still need to pass an items prop,
23
00:01:15,960 --> 00:01:18,510
just as we did before on the starting page.
24
00:01:18,510 --> 00:01:21,653
And we pass in all the events we loaded.
25
00:01:23,380 --> 00:01:25,820
So with that, we save this,
26
00:01:25,820 --> 00:01:28,330
we see all the events here on this page.
27
00:01:28,330 --> 00:01:32,010
And that was super easy to do and super easy to add
28
00:01:32,010 --> 00:01:35,160
because we already did work on the even items
29
00:01:35,160 --> 00:01:38,620
before in the earlier course lectures.
30
00:01:38,620 --> 00:01:41,450
Therefore, we now added a lot of functionality,
31
00:01:41,450 --> 00:01:45,570
but one crucial piece of functionality is missing.
32
00:01:45,570 --> 00:01:48,170
We also have this slug page,
33
00:01:48,170 --> 00:01:50,450
where we want to filter for events
34
00:01:50,450 --> 00:01:55,450
and where we want to consume multiple path segments.
35
00:01:55,900 --> 00:01:58,710
So therefore that will be the last main feature
36
00:01:58,710 --> 00:02:01,520
which we add before we'll then polish
37
00:02:01,520 --> 00:02:03,383
the overall app thereafter.
2956
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.