import React, { useState } from "react"; import PropTypes from "prop-types"; import { Card, CardActionArea, CardActions, CardContent, CardMedia, Chip, IconButton, Link, Menu, MenuItem, Typography } from "@material-ui/core"; import { red } from "@material-ui/core/colors"; import { AccountCircle, Favorite, Link as LinkIcon } from "@material-ui/icons"; import { useHistory } from "react-router-dom"; import NavBar from "./shared/NavBar"; import config from "../config"; // TODO: Replace with API accessed feeds import feeds from "./dummyData/feeds.json"; function FeedCard({ feed }) { const [filled, setFilled] = useState(Math.random() > 0.5); let style = {}; if (filled) { style={ color: red.A400 }; } return ( {feed.title} {feed.description} {feed.tags.map((tag, idx) => )} setFilled(!filled)}> ); } FeedCard.propTypes = { feed: PropTypes.object, }; function App() { const history = useHistory(); const [anchorEl, setAnchorEl] = useState(null); const open = Boolean(anchorEl); function handleMenu(event) { setAnchorEl(event.currentTarget); } function handleClose() { setAnchorEl(null); } function logout() { handleClose(); history.push("/"); } return (<>
Profile My account Logout
{feeds.map(feed => )}
); } export default App;