feat: update public state

This commit is contained in:
Artemy 2022-10-17 18:59:59 +03:00
parent 4a260de4dd
commit b6b7de4773

View file

@ -6,6 +6,7 @@ import ReactMarkdown from "react-markdown";
function CreateNote() { function CreateNote() {
const [preview, setPreview] = useState(false); const [preview, setPreview] = useState(false);
const [publicState, setPublicState] = useState(true);
const [text, setText] = useState(""); const [text, setText] = useState("");
return ( return (
@ -65,7 +66,9 @@ function CreateNote() {
className="justify-self-center lg:justify-self-start" className="justify-self-center lg:justify-self-start"
label="Публичная заметка" label="Публичная заметка"
id="public" id="public"
onClick={""} onClick={() => {
setPublicState(!publicState);
}}
checked checked
/> />
<div className="justify-self-center lg:justify-self-end"> <div className="justify-self-center lg:justify-self-end">