From 80d0779cfaaa14f15158f07b64caf8da5e0c07dd Mon Sep 17 00:00:00 2001 From: Ramisacode Date: Fri, 11 Oct 2024 20:18:11 -0400 Subject: [PATCH] Implemented toggle functionality for 5 boards --- src/components/BoardSwitcher.jsx | 21 ++++++++++++++++++--- src/main.jsx | 2 +- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/components/BoardSwitcher.jsx b/src/components/BoardSwitcher.jsx index e99793a..2b94d82 100644 --- a/src/components/BoardSwitcher.jsx +++ b/src/components/BoardSwitcher.jsx @@ -1,4 +1,6 @@ -import React from "react"; + +import React, {useState} from "react"; + function Board(props) { let className = "board"; @@ -10,18 +12,31 @@ function Board(props) { } function BoardSwitcher(props) { + const [numSelected, SetNumSelected] = useState(0); let boards = []; + + const handleClick = (event) =>{ + if(numSelected); } + return (
{boards}
- +
); } export default BoardSwitcher; + diff --git a/src/main.jsx b/src/main.jsx index 782f402..316ad56 100644 --- a/src/main.jsx +++ b/src/main.jsx @@ -6,6 +6,6 @@ import "./index.css"; const root = ReactDOM.createRoot(document.getElementById("root")); root.render( - + );