From b6b7de47738020ad456cc4405e0203961b29924a Mon Sep 17 00:00:00 2001 From: Artemy Date: Mon, 17 Oct 2022 18:59:59 +0300 Subject: [PATCH] feat: update public state --- src/pages/create.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pages/create.jsx b/src/pages/create.jsx index 40cbab8..3b95e5a 100644 --- a/src/pages/create.jsx +++ b/src/pages/create.jsx @@ -6,6 +6,7 @@ import ReactMarkdown from "react-markdown"; function CreateNote() { const [preview, setPreview] = useState(false); + const [publicState, setPublicState] = useState(true); const [text, setText] = useState(""); return ( @@ -65,7 +66,9 @@ function CreateNote() { className="justify-self-center lg:justify-self-start" label="Публичная заметка" id="public" - onClick={""} + onClick={() => { + setPublicState(!publicState); + }} checked />