From e4785f0a3b5cc0aa4bff1ee052fabc637e41540f Mon Sep 17 00:00:00 2001 From: zkldi Date: Sun, 4 Sep 2022 17:21:51 +0100 Subject: [PATCH] fix: empty description on sessions should set to null --- .../users/games/_game/_playtype/SpecificSessionPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/app/pages/dashboard/users/games/_game/_playtype/SpecificSessionPage.tsx b/client/src/app/pages/dashboard/users/games/_game/_playtype/SpecificSessionPage.tsx index 2d6b08b17..974da9e9e 100644 --- a/client/src/app/pages/dashboard/users/games/_game/_playtype/SpecificSessionPage.tsx +++ b/client/src/app/pages/dashboard/users/games/_game/_playtype/SpecificSessionPage.tsx @@ -247,7 +247,7 @@ function EditModal({ setShow: SetState; }) { const [name, setName] = useState(session.name); - const [desc, setDesc] = useState(session.desc ?? "No Description..."); + const [desc, setDesc] = useState(session.desc ?? ""); return ( setShow(false)}> @@ -268,7 +268,7 @@ function EditModal({ }, body: JSON.stringify({ name, - desc, + desc: desc.length === 0 ? null : desc, }), }, true, @@ -284,7 +284,7 @@ function EditModal({ } />