Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update App.js #152

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 2 additions & 25 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { BrowserRouter, Route, Link } from 'react-router-dom';
import './App.css';
import Header from './components/Header.js
import HomeScreen from './screens/HomeScreen';
import ProductScreen from './screens/ProductScreen';
import CartScreen from './screens/CartScreen';
Expand Down Expand Up @@ -28,31 +29,7 @@ function App() {
return (
<BrowserRouter>
<div className="grid-container">
<header className="header">
<div className="brand">
<button onClick={openMenu}>&#9776;</button>
<Link to="/">amazona</Link>
</div>
<div className="header-links">
<a href="cart.html">Cart</a>
{userInfo ? (
<Link to="/profile">{userInfo.name}</Link>
) : (
<Link to="/signin">Sign In</Link>
)}
{userInfo && userInfo.isAdmin && (
<div className="dropdown">
<a href="#">Admin</a>
<ul className="dropdown-content">
<li>
<Link to="/orders">Orders</Link>
<Link to="/products">Products</Link>
</li>
</ul>
</div>
)}
</div>
</header>
<Header openMenu={openMenu} userInfo={userInfo}/>
<aside className="sidebar">
<h3>Shopping Categories</h3>
<button className="sidebar-close-button" onClick={closeMenu}>
Expand Down