@@ -37,25 +37,29 @@ export function App() {
37
37
38
38
function MainLayout ( { favorites, isFavorite, updateFavorite } ) {
39
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 >
40
+ < BrowseVacationsPage
41
+ favorites = { favorites }
42
+ isFavorite = { isFavorite }
43
+ updateFavorite = { updateFavorite }
44
+ />
46
45
)
47
46
}
48
47
49
48
/****************************************
50
- BrowseVacationsPage.js
51
- *****************************************/
49
+ BrowseVacationsPage.js
50
+ *****************************************/
52
51
53
- function BrowseVacationsPage ( { isFavorite, updateFavorite } ) {
52
+ function BrowseVacationsPage ( { favorites , isFavorite, updateFavorite } ) {
54
53
return (
55
- < div className = "flex flex-col gap-2" >
56
- < FavoriteVacationButton id = { 1 } isFavorite = { isFavorite } updateFavorite = { updateFavorite } />
57
- < FavoriteVacationButton id = { 2 } isFavorite = { isFavorite } updateFavorite = { updateFavorite } />
58
- < FavoriteVacationButton id = { 3 } isFavorite = { isFavorite } updateFavorite = { updateFavorite } />
54
+ < div className = "flex justify-between" >
55
+ < div > Favorites: { JSON . stringify ( favorites ) } </ div >
56
+ < div >
57
+ < div className = "flex flex-col gap-2" >
58
+ < FavoriteVacationButton id = { 1 } isFavorite = { isFavorite } updateFavorite = { updateFavorite } />
59
+ < FavoriteVacationButton id = { 2 } isFavorite = { isFavorite } updateFavorite = { updateFavorite } />
60
+ < FavoriteVacationButton id = { 3 } isFavorite = { isFavorite } updateFavorite = { updateFavorite } />
61
+ </ div >
62
+ </ div >
59
63
</ div >
60
64
)
61
65
}
0 commit comments