File tree Expand file tree Collapse file tree 1 file changed +11
-9
lines changed
react/core/06-context/lecture Expand file tree Collapse file tree 1 file changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -25,23 +25,25 @@ export function App() {
25
25
return (
26
26
< LessonBody >
27
27
< LessonCard >
28
- < div className = "flex justify-between" >
29
- < div > Favorites: { JSON . stringify ( favorites ) } </ div >
30
- < div >
31
- < VacationsSubLayout isFavorite = { isFavorite } updateFavorite = { updateFavorite } />
32
- </ div >
33
- </ div >
28
+ < MainLayout favorites = { favorites } isFavorite = { isFavorite } updateFavorite = { updateFavorite } />
34
29
</ LessonCard >
35
30
</ LessonBody >
36
31
)
37
32
}
38
33
39
34
/****************************************
40
- VacationsSubLayout .js
35
+ MainLayout .js
41
36
*****************************************/
42
37
43
- function VacationsSubLayout ( { isFavorite, updateFavorite } ) {
44
- return < BrowseVacationsPage isFavorite = { isFavorite } updateFavorite = { updateFavorite } />
38
+ function MainLayout ( { favorites, isFavorite, updateFavorite } ) {
39
+ return (
40
+ < div className = "flex justify-between" >
41
+ < div > Favorites: { JSON . stringify ( favorites ) } </ div >
42
+ < div >
43
+ < BrowseVacationsPage isFavorite = { isFavorite } updateFavorite = { updateFavorite } />
44
+ </ div >
45
+ </ div >
46
+ )
45
47
}
46
48
47
49
/****************************************
You can’t perform that action at this time.
0 commit comments