Set default unit to "lbs" and updated placeholder text

This commit is contained in:
Andrew Scott 2022-06-04 23:21:20 -04:00
parent 2b36d6bfa7
commit 6a8c513204
Signed by: a
GPG key ID: 3EB62D0BBB8DB381

View file

@ -6,7 +6,7 @@ export const CreatePage = () => {
const [name, setName] = useState(""); const [name, setName] = useState("");
const [reps, setReps] = useState(""); const [reps, setReps] = useState("");
const [weight, setWeight] = useState(""); const [weight, setWeight] = useState("");
const [unit, setUnit] = useState(""); const [unit, setUnit] = useState("lbs");
const [date, setDate] = useState(""); const [date, setDate] = useState("");
const history = useHistory(); const history = useHistory();
@ -31,31 +31,31 @@ export const CreatePage = () => {
<h2>Create Exercise</h2> <h2>Create Exercise</h2>
<input <input
type="text" type="text"
placeholder="Enter name here" placeholder="Exercise name"
value={name} value={name}
onChange={(e) => setName(e.target.value)} onChange={(e) => setName(e.target.value)}
/> />
<input <input
type="number" type="number"
placeholder="Enter reps here" min="1"
placeholder="# of reps"
value={reps} value={reps}
onChange={(e) => setReps(e.target.value)} onChange={(e) => setReps(e.target.value)}
/> />
<input <input
type="number" type="number"
placeholder="Enter weight here" min="1"
placeholder="Weight"
value={weight} value={weight}
onChange={(e) => setWeight(e.target.value)} onChange={(e) => setWeight(e.target.value)}
/> />
<select value={unit} onChange={(e) => setUnit(e.target.value)}>
<option value="lbs">lbs</option>
<option value="kgs">kgs</option>
</select>
<input <input
type="text" type="text"
placeholder="Enter unit here" placeholder="Date (MM-DD-YY)"
value={unit}
onChange={(e) => setUnit(e.target.value)}
/>
<input
type="text"
placeholder="Enter date here"
value={date} value={date}
onChange={(e) => setDate(e.target.value)} onChange={(e) => setDate(e.target.value)}
/> />