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

first commit #173

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
22 changes: 1 addition & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@testing-library/user-event": "^12.8.3",
"antd": "^4.23.1",
"axios": "^0.21.4",
"caniuse-lite": "^1.0.30001627",
"firebase": "^9.0.2",
"mui": "^0.0.1",
"react": "^17.0.2",
Expand Down
108 changes: 73 additions & 35 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 @@ -58,49 +58,87 @@ function App() {

return (
<>

<BrowserRouter>
<div className="App">
<Routes>
<Route path="/thanku" element={<>
<Header />
<Thanku />
</>} />
<Route path="/Payment" element={<>
<Header />
{/* wraps the payment elements,
<Route
path="/thanku"
element={
<>
<Header />
<Thanku />
</>
}
/>
<Route
path="/Payment"
element={
<>
<Header />
{/* wraps the payment elements,
no need to understand it */}
<Elements stripe={stripePromise}>
<Payment />
</Elements>
</>} />
<Elements stripe={stripePromise}>
<Payment />
</Elements>
</>
}
/>

<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 path="/fashion-beauty" element={<>
<Header />
<Navbar />
<FashionBeauty />
</>} />
<Route
path="/checkout"
element={
<>
<Header />
<Checkout />
</>
}
/>
<Route
path="/books-toys"
element={
<>
{' '}
<Header />
<Navbar />
<BookToys />
</>
}
/>
<Route
path="/fashion-beauty"
element={
<>
<Header />
<Navbar />
<FashionBeauty />
</>
}
/>

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

<Route path="/" element={<>
<Header inputHandler={inputHandler} />
<Navbar />
<Home text={searchField} />
<AllCategories />
</>} />
<Route
path="/"
element={
<>
<Header inputHandler={inputHandler} />
<Navbar />
<Home text={searchField} />
<AllCategories />
</>
}
/>
</Routes>
<Footer />
</div>
Expand Down
Loading