import './App.css'; import { BrowserRouter as Router, Route, Redirect, Switch } from 'react-router-dom'; import Home from './Pages/Home'; import Login from './Pages/Login'; import Signup from './Pages/Signup'; import Product from "./Pages/Product"; import ProductsList from "./Pages/ProductsList"; import Admin from './Pages/Admin'; import ProductRegist from './Pages/ProductRegist'; import ShoppingCart from './Pages/ShoppingCart'; import Payment from './Pages/Payment'; import Mypage from './Pages/Mypage'; import MainNav from './Components/MainNav'; import SubNav from './Components/SubNav'; function App() { // const [user,setUser]=useState(null); // const authenticated =user !=null; // const login =({id, password}) => setUser(signIn({id,password})); // const logout=()=>setUser(null); return (