Skip to content

Commit

Permalink
commiting new changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushrlw committed Mar 13, 2023
1 parent 867ceab commit 1773cf1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 34 deletions.
56 changes: 24 additions & 32 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import Header from './components/header/Header';
import Home from './pages/home/Home';
import { BrowserRouter,Routes, Route } from 'react-router-dom';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import Checkout from './components/checkOut/Checkout';
import Login from './pages/login/Login';
import { auth } from './firebase';
Expand All @@ -24,7 +24,7 @@ const stripePromise = loadStripe(
);
function App() {
//to keep a check who is signed in/making a listner
const [{}, dispatch] = useStateValue();
const [{ }, dispatch] = useStateValue();
//This State will keep Track of what is entered in the searchField
const [searchField, setSearchField] = useState('');

Expand Down Expand Up @@ -55,64 +55,56 @@ function App() {
}
});
}, []);

return (
<>

<BrowserRouter>
<div className="App">
<Routes>
<Route path="/thanku">
<Route path="/thanku" element={<>
<Header />

<Thanku />
</Route>
<Route path="/Payment" element={<Elements stripe={stripePromise}>
<Payment />
</Elements>}>
</>} />
<Route path="/Payment" element={<>
<Header />
{/* wraps the payment elements,
no need to understand it */}
</Route>
<Route path="/login">
<Login />
</Route>
<Route path="/signup">
<Signup />
</Route>
<Route path="/checkout">
<Header />
<Checkout />
</Route>
<Elements stripe={stripePromise}>
<Payment />
</Elements>
</>} />

<Route path="/books-toys">
<Route path="/login" element={<Login />} />
<Route path="/signup" element={<Signup />} />
<Route path="/checkout" element={<>
<Header />
<Checkout /></>} />
<Route path="/books-toys" element={<> <Header />
<Navbar />
<BookToys />
</Route>

<Route path="/fashion-beauty">
<BookToys /></>} />
<Route path="/fashion-beauty" element={<>
<Header />
<Navbar />
<FashionBeauty />
</Route>
</>} />

<Route path="/electronics">
<Route path="/electronics" element={<>
<Header />
<Navbar />
<Electronics />
</Route>
</>} />

<Route path="/">
<Route path="/" element={<>
<Header inputHandler={inputHandler} />
<Navbar />
<Home text={searchField} />
<AllCategories />
</Route>
</>} />
</Routes>
<Footer />
</div>
</BrowserRouter>
</BrowserRouter>
</>
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/footer/Footer.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react'
import "./footer.css"
import { useState } from 'react';
import Divider from '@material-ui/core/Divider';
// import Divider from '@material-ui/core/Divider';

import amnLogo from '../src/assets/amazon-logo.png';
import amnLogo from '../../assets/amazon-logo.png';

import logo from './amazon-logo.png';

Expand Down

0 comments on commit 1773cf1

Please sign in to comment.