File tree Expand file tree Collapse file tree 3 files changed +14
-30
lines changed
Expand file tree Collapse file tree 3 files changed +14
-30
lines changed Original file line number Diff line number Diff line change 1+ function AllMeetupsPage ( ) {
2+ return < div > All Meetups Page</ div > ;
3+ }
4+
5+ export default AllMeetupsPage ;
Original file line number Diff line number Diff line change 1- import React , { useContext , useState } from 'react' ;
2- import { useSelector } from 'react-redux' ;
1+ function FavoritesPage ( ) {
2+ return < div > Favorites Page</ div > ;
3+ }
34
4- import FavoriteItem from '../components/Favorites/FavoriteItem' ;
5- import './Products.css' ;
6- import { ProductsContext } from "../context/products-context" ;
7- import { useStore } from "../components/hooks-store/store" ;
8-
9- const Favorites = props => {
10-
11- const state = useStore ( [ 0 ] )
12- const favoriteProducts = state . products . filter ( p => p . isFavorite )
13- let content = < p className = "placeholder" > Got no favorites yet!</ p > ;
14- if ( favoriteProducts . length > 0 ) {
15- content = (
16- < ul className = "products-list" >
17- { favoriteProducts . map ( prod => (
18- < FavoriteItem
19- key = { prod . id }
20- id = { prod . id }
21- title = { prod . title }
22- description = { prod . description }
23- />
24- ) ) }
25- </ ul >
26- ) ;
27- }
28- return content ;
29- } ;
30-
31- export default Favorites ;
5+ export default FavoritesPage ;
Original file line number Diff line number Diff line change 1+ function NewMeetupPage ( ) {
2+ return < div > New Meetup Page</ div > ;
3+ }
4+
5+ export default NewMeetupPage ;
You can’t perform that action at this time.
0 commit comments