Skip to content

Commit

Permalink
Update App.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanskriti65 committed Jan 15, 2025
1 parent 0750462 commit db79b28
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useState } from 'react';
import { Routes, Route } from 'react-router-dom'; // Don't forget to import Routes and Route from react-router-dom
import { Routes, Route } from 'react-router-dom';
import './index.css';
import Header from './components/Header';
import MainSection1 from './components/MainSection1';
Expand Down Expand Up @@ -30,10 +30,10 @@ function App() {
return (
<div>
{/* Header is visible on all pages */}
<Header toggleSidebar={toggleSidebar} />
<Header />

<Routes>
{/* Homepage route, renders all sections */}

<Route
path="/"
element={
Expand All @@ -53,13 +53,13 @@ function App() {

{/* Other pages */}
<Route path="/login" element={<Login />} />
<Route path="/instamart" element={<Instamart />} />
<Route path="/contact" element={<ContactUs />} />
<Route path="/best-places" element={<BestPlacesSection />} />
<Route path="/Instamart" element={<Instamart />} />
<Route path="/Contact" element={<ContactUs />} />
<Route path="/Best-places" element={<BestPlacesSection />} />
<Route path="/SignUp" element={<SignUp />} />
</Routes>

{/* Bottom Navbar, Mobile Navbar, and Footer always visible except on /SignUp */}

<Routes>
<Route path="/SignUp" element={null} /> {/* Prevent navbar/footer on SignUp page */}

Expand Down

0 comments on commit db79b28

Please sign in to comment.