Skip to content

Commit b58e31e

Browse files
Add files via upload
1 parent b92ba04 commit b58e31e

File tree

3 files changed

+14
-30
lines changed

3 files changed

+14
-30
lines changed

AllMeetups.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function AllMeetupsPage() {
2+
return <div>All Meetups Page</div>;
3+
}
4+
5+
export default AllMeetupsPage;

Favorites.js

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,5 @@
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;

NewMeetup.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function NewMeetupPage() {
2+
return <div>New Meetup Page</div>;
3+
}
4+
5+
export default NewMeetupPage;

0 commit comments

Comments
 (0)