Skip to content

Commit 8e8d82b

Browse files
committed
small update to lesson
1 parent 4f07ffe commit 8e8d82b

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

react/core/06-context/lecture/hello-world.jsx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,25 @@ export function App() {
2525
return (
2626
<LessonBody>
2727
<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} />
3429
</LessonCard>
3530
</LessonBody>
3631
)
3732
}
3833

3934
/****************************************
40-
VacationsSubLayout.js
35+
MainLayout.js
4136
*****************************************/
4237

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+
)
4547
}
4648

4749
/****************************************

0 commit comments

Comments
 (0)