1
00:00:00,780 --> 00:00:05,790
And when it comes to Preve Bridge and the next bridge from John is going to be extremely, extremely

2
00:00:05,790 --> 00:00:11,630
similar, the only difference is that in one case, in a brief bridge, we're subtracting one in the

3
00:00:11,640 --> 00:00:19,650
another one, we're adding one and then we'll have to make a decision if we come to the last page or

4
00:00:19,650 --> 00:00:21,330
we come to the first page.

5
00:00:21,900 --> 00:00:26,230
And the way I'll set it up for a brief page will go with let and this is done on purpose.

6
00:00:26,300 --> 00:00:29,430
Your page and your variable will check for state value.

7
00:00:29,580 --> 00:00:30,930
Add or subtract one.

8
00:00:31,920 --> 00:00:39,160
And none will pass in that new bridge into Genge Bridge, just like I said with button container basically

9
00:00:39,160 --> 00:00:45,480
will use the same functional parts in the new bridge, but we need to take it into account that we have

10
00:00:45,480 --> 00:00:47,790
the first bridge, meaning page number one.

11
00:00:48,340 --> 00:00:53,550
And if the value actually is less than one, then we need to make a decision.

12
00:00:54,360 --> 00:01:02,460
So either we set new page equals to one meaning if we are trying to get to the proof bridge.

13
00:01:02,460 --> 00:01:05,850
But pages already first one will always keep it as one.

14
00:01:06,330 --> 00:01:10,860
So as you're clicking on the Preve bridge, you're not going to get any further, which kind of makes

15
00:01:10,860 --> 00:01:16,200
sense because I mean, otherwise our functionality is going to break or in my case, what I'm going

16
00:01:16,200 --> 00:01:16,560
to do.

17
00:01:16,830 --> 00:01:22,890
I'm going to set new page equal to the numb pages, which is actually our last bridge.

18
00:01:23,160 --> 00:01:26,230
And if you're someone iffy on this one, you'll see it in action.

19
00:01:26,250 --> 00:01:29,550
I'm just showcasing right away alternative, but I'm not going to use this one.

20
00:01:30,180 --> 00:01:33,870
And then when it comes to the next bridge, the idea is exactly the same.

21
00:01:33,910 --> 00:01:40,020
However, in this case, I'm checking for the last page, so I'm checking if the new bridge is bigger

22
00:01:40,020 --> 00:01:42,510
than I'm off pages, which is the last page.

23
00:01:43,380 --> 00:01:49,770
And again, I need to make a decision either I just set new page equal to nine pages, which means that

24
00:01:50,130 --> 00:01:52,560
user won't be able to get anywhere.

25
00:01:53,130 --> 00:01:54,930
So once we are on the last page, that's it.

26
00:01:55,440 --> 00:01:58,380
Or like my said, I'm going to go to a page number one.

27
00:01:58,560 --> 00:01:59,050
Same deal.

28
00:01:59,050 --> 00:02:07,650
We're passing the new page into the change page, so let's navigate to jobs container or sorry, the

29
00:02:07,650 --> 00:02:08,830
page button container.

30
00:02:08,880 --> 00:02:09,990
That's where I want it to be.

31
00:02:10,470 --> 00:02:13,140
And then let's set up that logic right away.

32
00:02:13,230 --> 00:02:14,550
We'll go with Let.

33
00:02:15,640 --> 00:02:20,500
And learn new page that is equal to page minus one.

34
00:02:21,040 --> 00:02:26,020
And before we set up the condition, let's right away call the change page as well sort change bridge

35
00:02:26,380 --> 00:02:27,280
and New Bridge.

36
00:02:27,580 --> 00:02:29,140
So hopefully we're clear on this one.

37
00:02:29,440 --> 00:02:34,630
So this would be the most basic set up only thing we need to take into account that we have a first

38
00:02:34,630 --> 00:02:41,080
page and last page, and if we'll just leave it the way it is, then at some point page will be zero,

39
00:02:41,320 --> 00:02:48,670
which won't make any sense since I don't have here any buttons, first of all, but represent that and

40
00:02:48,670 --> 00:02:51,280
also on a server, it's not going to make sense.

41
00:02:51,550 --> 00:02:51,880
Correct.

42
00:02:52,390 --> 00:02:58,540
So let's also right away and that commission what I'm going to say, if new page is less than my first

43
00:02:58,540 --> 00:03:01,120
page, then we need to make a decision.

44
00:03:01,450 --> 00:03:06,400
And in my case, I'm going to go to new page is equal to number of pages.

45
00:03:06,570 --> 00:03:10,600
And that's why I'm setting this one up with Let let's save this.

46
00:03:11,050 --> 00:03:13,810
And now let's do the same thing on the Senate.

47
00:03:14,080 --> 00:03:20,530
I want to a next page, so you know, I'll have to copy and paste my apologies.

48
00:03:20,950 --> 00:03:23,080
And this is the preview one.

49
00:03:23,640 --> 00:03:26,890
Now we need to work on next door check arrhythmias.

50
00:03:26,890 --> 00:03:30,340
Correct, though, so read me fine or here.

51
00:03:30,340 --> 00:03:31,420
I just want the other way.

52
00:03:31,840 --> 00:03:40,540
So now let's go with +1 for next page and in here or see if the new page is bigger than normal pages.

53
00:03:40,900 --> 00:03:43,500
That's the last page run on.

54
00:03:43,570 --> 00:03:45,310
Set it equal to you first.

55
00:03:45,610 --> 00:03:51,910
So let's say this let's navigate to the browser and now what you'll notice not only I can change the

56
00:03:51,910 --> 00:03:54,820
values over here using the buttons again.

57
00:03:54,820 --> 00:03:56,290
Let me check it out.

58
00:03:56,710 --> 00:04:02,110
So I have here page number five, but also as I'm clicking notice all the values changing.

59
00:04:02,650 --> 00:04:05,530
And once I get the last one, I got two options.

60
00:04:05,740 --> 00:04:11,240
Either we always keep it equal to the last page, which just means that as are going to be clicking,

61
00:04:11,240 --> 00:04:16,180
you're not going to get any further or in my case, I'm going to go to page number one.

62
00:04:16,570 --> 00:04:16,940
I'm not.

63
00:04:16,990 --> 00:04:19,570
The same goes with Preve, where it may go to.

64
00:04:19,570 --> 00:04:25,960
For me, if I go down now, I get the page number one, I need to make a decision and in my case, I'm

65
00:04:25,960 --> 00:04:27,940
going to go to the last page.

