Skip to content

Commit

Permalink
changed add icon and fixed page routing for /home to /
Browse files Browse the repository at this point in the history
  • Loading branch information
Ph1so committed Aug 13, 2024
1 parent bc34874 commit 7f2f022
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 5 additions & 3 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ import { WorkoutProvider } from "./components/WorkoutContext"; // Import the Wor
// TODO: consider putting the array of day names + workouts here instead of in WorkoutName.js and then passing it down as props
function App() {
return (
<WorkoutProvider> {/* Wrap Router with WorkoutProvider */}
<WorkoutProvider>
{" "}
{/* Wrap Router with WorkoutProvider */}
<Router>
<div className="App">
<Navbar />
<Routes>
<Route path="/home" element={<LandingPage />} />
<Route path="/" element={<LandingPage />} />
<Route path="/workout" element={<WorkoutPage />} />
<Route path="/analysis" element={<AnalysisPage />} />
<Route path="/waitlist" element={<WaitlistPage />} />
Expand All @@ -35,4 +37,4 @@ const WorkoutPage = () => (
</div>
);

export default App;
export default App;
2 changes: 1 addition & 1 deletion src/components/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Navbar = () => {

return (
<nav className="navbar">
<Link to="/home" className="navbar-title" onClick={closeMenu}>
<Link to="/" className="navbar-title" onClick={closeMenu}>
Endure AI
</Link>
<button className="menu-toggle" onClick={toggleMenu}>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Options.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from "react";
import PropTypes from "prop-types";
import { useNavigate } from "react-router-dom";
import "./Options.css";
import { GrAddCircle } from "react-icons/gr";
import { FaCirclePlus } from "react-icons/fa6";
import { GrSubtractCircle } from "react-icons/gr";

const Options = ({ exercises, onExercisesChange }) => {
Expand Down Expand Up @@ -257,7 +257,7 @@ const Options = ({ exercises, onExercisesChange }) => {

{index === exercises.length - 1 ? (
<button className="Add-Workout" onClick={addExercise}>
<GrAddCircle color="#9692fe" />
<FaCirclePlus color="#9692fe" />
</button>
) : (
<button
Expand Down

0 comments on commit 7f2f022

Please sign in to comment.