Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cruz27r committed Jan 9, 2024
1 parent 4399a86 commit 7d66426
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { BrowserRouter as Router, Route, Routes} from 'react-router-dom';
import { BrowserRouter as Router, Route, Routes, useLocation} from 'react-router-dom';
//import logoImage from './assets/images/P2E_Logo.png'; // Correct path to image
import HomePage from './pages/HomePage/homePage';
import EventsForReadiness from './pages/EventsForReadiness/eventsForReadiness';
Expand All @@ -16,11 +16,26 @@ import NavBar from './components/NavBar/navbar';
import SubmitResume from './pages/SubmitResume/submitResume';
import MaintenancePage from './pages/Maintenance/MaintenancePage'; // Path to your MaintenancePage component

const Layout = ({ children }) => {
const location = useLocation(); // Get the current location

// Check if the current path is not the maintenance page
const showNavBar = location.pathname !== "/";

return (
<>
{showNavBar && <NavBar />}
<div className="main-content">
{children}
</div>
</>
);
};

function App() {
return (
<Router>
<div className="App">
<NavBar/>
<Routes>
<Route path="/" element={<MaintenancePage />} />
<Route path="/home" element={<HomePage />} />
Expand Down

0 comments on commit 7d66426

Please sign in to comment.