Cleaned up, extracted List to a component
This commit is contained in:
parent
76fb43b9d6
commit
f45abdecc9
File diff suppressed because one or more lines are too long
@ -6,13 +6,13 @@ export default function Workplace() {
|
||||
const [height, setHeight] = useState("");
|
||||
const [rectangleArray, setRectangleArray] = useState("");
|
||||
|
||||
const numbers = [{ w: "100px", h: "100px", c: "red" }];
|
||||
numbers.push({ w: "200px", h: "300px", c: "cyan" });
|
||||
const rectangles = [{ w: "100px", h: "100px", c: "red" }];
|
||||
rectangles.push({ w: "200px", h: "300px", c: "cyan" });
|
||||
|
||||
const handleFormSubmit = (e) => {
|
||||
e.preventDefault();
|
||||
numbers.push({ w: width + "px", h: height + "px", c: "blue" });
|
||||
console.log(numbers);
|
||||
rectangles.push({ w: width + "px", h: height + "px", c: "blue" });
|
||||
console.log(rectangles);
|
||||
};
|
||||
|
||||
return (
|
||||
|
Loading…
Reference in New Issue
Block a user