1
00:00:00,180 --> 00:00:02,730
All right, and we're pretty much done with our application.

2
00:00:03,140 --> 00:00:09,900
Now we just need to get our production ready and we'll start by fixing the warnings that we have in

3
00:00:09,900 --> 00:00:10,380
the council.

4
00:00:10,710 --> 00:00:13,950
And also I want to invoke the log out user.

5
00:00:14,310 --> 00:00:22,140
If you remember, while we were still building everything, I left the console.log for error, not response,

6
00:00:22,440 --> 00:00:25,140
and then commented out the log out user.

7
00:00:25,500 --> 00:00:30,960
But now, since we're going to production, I actually want to invoke it and we want to do that in three

8
00:00:30,960 --> 00:00:31,410
places.

9
00:00:31,830 --> 00:00:35,990
Good jobs, the lead job, as well as show start.

10
00:00:36,600 --> 00:00:39,120
So let's go to the app context first.

11
00:00:39,900 --> 00:00:42,180
Now we're looking for those three functions.

12
00:00:42,720 --> 00:00:45,030
So let me first get these show.

13
00:00:45,120 --> 00:00:50,310
That's one where I'll remove the console.log and I'll invoke the logo user.

14
00:00:50,760 --> 00:00:54,030
Same thing is going to be here for the week job.

15
00:00:54,420 --> 00:00:58,920
And also, we have the same setup in the get jobs.

16
00:00:59,250 --> 00:01:06,690
So let's set up this one first and then let's worry about the warnings that we have in the console and

17
00:01:06,810 --> 00:01:07,590
in a console.

18
00:01:07,590 --> 00:01:08,850
We have three warnings.

19
00:01:09,300 --> 00:01:14,130
We have two for missing dependencies and we also have one for link.

20
00:01:14,520 --> 00:01:21,480
So in the shared layout, while I was showing everything, I imported the link and effectively I didn't

21
00:01:21,480 --> 00:01:21,930
remove it.

22
00:01:22,350 --> 00:01:26,550
So let me go back to the shared layout and I want to remove this link.

23
00:01:27,000 --> 00:01:34,290
And as far as the other two warnings, we have good jobs and show stats and complaints that they're

24
00:01:34,290 --> 00:01:36,480
missing in Dependencia right now.

25
00:01:36,480 --> 00:01:43,780
The thing is, if we'll just add them to dependency, right, we'll get the infinite loop because in

26
00:01:43,830 --> 00:01:49,560
these functions, we update the state value and in the process we trigger the original render.

27
00:01:49,860 --> 00:01:54,840
And then once we trigger the render when again, we invoke the function.

28
00:01:55,500 --> 00:01:57,340
So that's how we can get the infinite loop.

29
00:01:57,360 --> 00:02:05,010
So whatever you do, do not add them straight up to the dependency array and you have two options we

30
00:02:05,010 --> 00:02:08,430
can do the quick and dirty way where we just add the comment.

31
00:02:08,880 --> 00:02:13,380
So then we won't get this warning or we can set up the first callback.

32
00:02:13,800 --> 00:02:19,950
Now, since I really want to focus on deploying the application, I'll actually take the quick and dirty

33
00:02:19,950 --> 00:02:26,640
route where effectively we just need to go back to the console and we right away have a suggestion to

34
00:02:26,640 --> 00:02:27,150
ignore.

35
00:02:27,870 --> 00:02:29,850
Yes, disabled max line.

36
00:02:30,300 --> 00:02:33,360
So now I just want to locate both of the files.

37
00:02:33,360 --> 00:02:34,440
So we have stats.

38
00:02:34,620 --> 00:02:37,020
That's the page and also jumps container.

39
00:02:37,290 --> 00:02:41,220
And right after we invoke those functions, we just need to add this line of code.

40
00:02:41,610 --> 00:02:45,330
Now you can also find it in the read me this line of code.

41
00:02:45,780 --> 00:02:51,480
So let's navigate right now to the stats and then right after shows that this gunman.

42
00:02:51,840 --> 00:02:54,150
And the same is going to be in the jobs container.

43
00:02:54,600 --> 00:03:00,030
And another approach you can take is set up the huge callback hook.

44
00:03:00,330 --> 00:03:02,130
So now it's served notice.

45
00:03:02,130 --> 00:03:04,290
We have no warnings in the console.

46
00:03:04,630 --> 00:03:06,510
Now we can move on to the next step.

