1
00:00:02,000 --> 00:00:04,000
So let's now work on this all events page.

2
00:00:04,000 --> 00:00:08,000
So on this index.js file in the events folder.

3
00:00:08,000 --> 00:00:11,000
Here, we want to render all events,

4
00:00:11,000 --> 00:00:14,000
not filtered, not featured, all events.

5
00:00:14,000 --> 00:00:18,000
And therefore, of course, we want to get all events.

6
00:00:18,000 --> 00:00:21,000
So here we grab all our events,

7
00:00:21,000 --> 00:00:24,000
by reaching out to get all events,

8
00:00:24,000 --> 00:00:26,000
which is another helper function

9
00:00:26,000 --> 00:00:29,000
defined in the dummy-data.js file.

10
00:00:29,000 --> 00:00:32,000
Here I have the get all events function,

11
00:00:32,000 --> 00:00:36,000
which returns the entire dummy events events array.

12
00:00:37,000 --> 00:00:39,000
So here we call that, and in order to call it,

13
00:00:39,000 --> 00:00:43,000
we need to import it from dummy data.

14
00:00:43,000 --> 00:00:45,000
Now that we get the events here,

15
00:00:45,000 --> 00:00:48,000
we wanna render a list of those events.

16
00:00:48,000 --> 00:00:52,000
And that is where we can reuse our event list component.

17
00:00:52,000 --> 00:00:56,000
So at the top, we just need to import event list

18
00:00:56,000 --> 00:00:59,000
from and then go up two levels,

19
00:00:59,000 --> 00:01:03,000
dive into components, events, event list,

20
00:01:03,000 --> 00:01:07,000
and then simply output this event list component again here.

21
00:01:07,000 --> 00:01:12,000
Event, oops, event list, like this.

22
00:01:12,000 --> 00:01:15,000
And to event list, we still need to pass an items prop,

23
00:01:15,000 --> 00:01:18,000
just as we did before on the starting page.

24
00:01:18,000 --> 00:01:21,000
And we pass in all the events we loaded.

25
00:01:23,000 --> 00:01:25,000
So with that, we save this,

26
00:01:25,000 --> 00:01:28,000
we see all the events here on this page.

27
00:01:28,000 --> 00:01:32,000
And that was super easy to do and super easy to add

28
00:01:32,000 --> 00:01:35,000
because we already did work on the even items

29
00:01:35,000 --> 00:01:38,000
before in the earlier course lectures.

30
00:01:38,000 --> 00:01:41,000
Therefore, we now added a lot of functionality,

31
00:01:41,000 --> 00:01:45,000
but one crucial piece of functionality is missing.

32
00:01:45,000 --> 00:01:48,000
We also have this slug page,

33
00:01:48,000 --> 00:01:50,000
where we want to filter for events

34
00:01:50,000 --> 00:01:55,000
and where we want to consume multiple path segments.

35
00:01:55,000 --> 00:01:58,000
So therefore that will be the last main feature

36
00:01:58,000 --> 00:02:01,000
which we add before we'll then polish

37
00:02:01,000 --> 00:02:03,000
the overall app thereafter.

