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

Nav stylings #6

Merged
merged 6 commits into from
Jul 29, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
setup react router and moved components into homepage comp
  • Loading branch information
ian-flynn committed Jul 29, 2023
commit b7fe15fca4f7b1551d1a97efe2435aa1a435625e
19 changes: 11 additions & 8 deletions src/components/App.jsx → src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React, { useEffect, useState } from 'react';
import NavBar from './NavBar.jsx';
import SurfData from './SurfData.jsx';
import NavBar from './components/NavBar.jsx';
import SurfData from './components/SurfData.jsx';
import Homepage from './pages/Homepage.jsx';
import { BrowserRouter, Routes, Route } from 'react-router-dom';

const App = () => {
const [user, setUser] = useState(null);
Expand Down Expand Up @@ -28,12 +30,13 @@ const App = () => {
}, []);

return (
<div id='wrapper'>
<div id='app'>
<NavBar user={user} setUser={setUser} />
<SurfData />
</div>
</div>
<BrowserRouter>
<NavBar user={user} />
<Routes>
<Route path='/' exact element={<Homepage />} />
{/* add route for eventual login page */}
</Routes>
</BrowserRouter>
);
};

Expand Down