From ca9281f2266dcf4d8b43ba21e1497cd21c7e3cd3 Mon Sep 17 00:00:00 2001 From: Artemy Date: Mon, 1 May 2023 18:04:10 +0300 Subject: [PATCH] fix: publish button view and edit icon --- src/pages/note.jsx | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/pages/note.jsx b/src/pages/note.jsx index d176d9d..38c998a 100644 --- a/src/pages/note.jsx +++ b/src/pages/note.jsx @@ -17,6 +17,7 @@ import { useParams } from "react-router-dom"; import { + ArchiveBoxArrowDownIcon, ChevronDoubleLeftIcon, ChevronDoubleRightIcon, PencilIcon, @@ -82,7 +83,7 @@ function NotePage() { { if (edit) { notes[params.id].name = name; @@ -94,26 +95,29 @@ function NotePage() { setEdit(!edit); }} /> - + {!edit && ( - { - let notesObj = localStorage.getObj("Notes"); + <> + + { + let notesObj = localStorage.getObj("Notes"); - delete notesObj[params.id]; + delete notesObj[params.id]; - localStorage.setObj("Notes", notesObj); - }} - /> + localStorage.setObj("Notes", notesObj); + }} + /> + )}