From cc8f8e6fd9446e60b4e16693c4e30c51bb85b656 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Grutle?= Date: Fri, 21 Jun 2024 07:33:49 +0200 Subject: [PATCH] chore(edit): remove id --- .../edit/[id]/components/DuplicateBoard/index.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/next-tavla/app/(admin)/edit/[id]/components/DuplicateBoard/index.tsx b/next-tavla/app/(admin)/edit/[id]/components/DuplicateBoard/index.tsx index e11534a53..44fcdf1b7 100644 --- a/next-tavla/app/(admin)/edit/[id]/components/DuplicateBoard/index.tsx +++ b/next-tavla/app/(admin)/edit/[id]/components/DuplicateBoard/index.tsx @@ -17,14 +17,13 @@ function DuplicateBoard({ }) { const { addToast } = useToast() const handleSelect = async () => { - // eslint-disable-next-line @typescript-eslint/no-unused-vars - const { id, ...boardWithoutId } = board + delete board.id await create( { - ...boardWithoutId, + ...board, meta: { - ...boardWithoutId.meta, - title: boardWithoutId.meta.title + ' - duplikat', + ...board.meta, + title: board.meta.title + ' - duplikat', }, }, oid,