diff --git a/src/Pages/Home.jsx b/src/Pages/Home.jsx index 89ba392..20d3376 100644 --- a/src/Pages/Home.jsx +++ b/src/Pages/Home.jsx @@ -1,8 +1,22 @@ import React from 'react'; import '../App.css'; import './Home.css'; +import { useState } from 'react'; + + function Home({ onBegin }) { + + const [showPopup, setShowPopup] = useState(false); + const [workoutInput, setWorkoutInput] = useState(""); + const [newWorkouts, setWorkouts] = useState([]); + + const addWorkout = () => { + if (workoutInput.trim() === "") return; + setWorkouts([...newWorkouts, workoutInput.trim()]); + setWorkoutInput(""); + } + return (
@@ -47,6 +61,97 @@ function Home({ onBegin }) {
Settings
Adjust app
+ + + + {/*popup window itself*/} + {showPopup && ( +
+ {/*contents of popup window styling*/} +
+

Add a Workout

+ + setWorkoutInput(e.target.value)} + placeholder="Enter workout name" + style={{ + padding: "10px", + width: "80%", + marginBottom: "10px", + borderRadius: "8px", + border: "1px solid #ccc" + }} + /> + +
+ {newWorkouts.map((w, i) => ( +
+ • {w} +
+ ))} +
+ + +
+
+ )}