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