From 1156897864285dc074d3bc127f7cb8fd8ec68966 Mon Sep 17 00:00:00 2001 From: WCY-dt <834421194@qq.com> Date: Sat, 4 May 2024 17:00:26 +0800 Subject: [PATCH] Refactor dropdown menu in Edit component --- src/popups/edit.tsx | 15 ++++++++++----- src/styles/components/linkCard.css | 9 +++++---- src/styles/popups/edit.css | 6 +++++- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/popups/edit.tsx b/src/popups/edit.tsx index 5c3fc26..16c46fd 100644 --- a/src/popups/edit.tsx +++ b/src/popups/edit.tsx @@ -8,6 +8,7 @@ import "../styles/popups/edit.css"; function Edit() { const { + routes, showEdit, setShowEdit, editContent, editType, @@ -18,6 +19,8 @@ function Edit() { return null; } + const routesArray = Object.entries(routes).map(([value, label]) => ({ value, label })); + return (