1 00:00:00,960 --> 00:00:03,290 We're now rendering our list of surveys on the screen. 2 00:00:03,350 --> 00:00:07,930 But I think that we probably need to do a little bit of work to make this a little bit more usable. 3 00:00:08,160 --> 00:00:12,330 So the first thing I want to point out is that we are currently showing the oldest surveys at the very 4 00:00:12,330 --> 00:00:13,180 top. 5 00:00:13,250 --> 00:00:18,510 Thinking that it might make a little bit more sense to show the newest surveys at the top instead. 6 00:00:18,560 --> 00:00:22,410 And so we can achieve this with a very straightforward sort. 7 00:00:22,740 --> 00:00:25,260 So I'm going to go back into our survey list component. 8 00:00:25,400 --> 00:00:29,110 Here's where we create our surveys or list of surveys to show on the screen. 9 00:00:29,130 --> 00:00:36,800 And so before we map over these surveys array we can add in a dot reverse call right here. 10 00:00:36,990 --> 00:00:42,050 So this is going to take these surveys Auray reverse it and then map over it. 11 00:00:42,060 --> 00:00:49,170 So if we make this very quick change and save go back over to our browser you'll notice that now the 12 00:00:49,170 --> 00:00:51,430 newest survey is popping up at the top. 13 00:00:51,450 --> 00:00:53,610 So this is definitely working out pretty well. 14 00:00:53,610 --> 00:00:58,380 Now the next thing I want to do is just for fun I want to go back into our Mongo database and manually 15 00:00:58,380 --> 00:01:02,670 change some of the vote counts on here just to make it look like you know we've got a little bit more 16 00:01:02,670 --> 00:01:03,470 data. 17 00:01:03,600 --> 00:01:06,980 So back inside of our surveys collection here it is right here. 18 00:01:07,110 --> 00:01:08,950 Here's my super final test. 19 00:01:08,970 --> 00:01:12,420 Remember that I can always go in and manually edit some of this data. 20 00:01:12,540 --> 00:01:15,770 So I'll say we've got like I don't know. 21 00:01:16,000 --> 00:01:21,360 412 no votes and 49000 yes votes. 22 00:01:21,540 --> 00:01:24,710 A lot of votes will go down to the bottom and save. 23 00:01:25,010 --> 00:01:31,920 And now when we go back over to our application we can refresh the page and see some pretty crazy totals 24 00:01:31,920 --> 00:01:32,830 on here. 25 00:01:33,300 --> 00:01:34,020 OK. 26 00:01:34,440 --> 00:01:39,450 At this point I think that we've pretty much wrapped up the main feature set of the application. 27 00:01:39,450 --> 00:01:46,050 However as you can very easily guess there's still a tremendous amount of different places different 28 00:01:46,050 --> 00:01:47,100 features we can add. 29 00:01:47,100 --> 00:01:51,660 Probably your mind is even thinking boy it would be really awesome if we had some other x y z feature 30 00:01:52,050 --> 00:01:56,090 or if the display for each survey looked a little bit more interesting. 31 00:01:56,340 --> 00:01:58,970 So at this point I want to take a quick break. 32 00:01:58,980 --> 00:02:05,070 I want to do one final commit of our project over to Heroku and I want to talk a little bit about how 33 00:02:05,070 --> 00:02:10,380 we might make some improvements to our application and give you a couple of ideas on some things to 34 00:02:10,380 --> 00:02:13,760 work on to improve it and kind of take it to the next level. 35 00:02:13,760 --> 00:02:18,660 So let's take a quick break come back in the next section and work on doing one final deployment over 36 00:02:18,660 --> 00:02:19,310 to Hoku. 37 00:02:19,380 --> 00:02:20,790 So see you in just a minute.