From 9bc01e0c4fc2aaec138e9143f47bc71e49ec734b Mon Sep 17 00:00:00 2001 From: Enya <26k1234o3@gmail.com> Date: Thu, 17 Aug 2023 20:47:22 +0800 Subject: [PATCH] object-shorthand --- packages/frontend/js/components/RoomList.jsx | 94 ++++++++++---------- 1 file changed, 45 insertions(+), 49 deletions(-) diff --git a/packages/frontend/js/components/RoomList.jsx b/packages/frontend/js/components/RoomList.jsx index 37f0a07c..87f462ec 100644 --- a/packages/frontend/js/components/RoomList.jsx +++ b/packages/frontend/js/components/RoomList.jsx @@ -39,10 +39,8 @@ const RoomList = () => { setNewRoom({ ...newRoom, [e.target.name]: e.target.value, - // eslint-disable-next-line object-shorthand - userName: userName, - // eslint-disable-next-line object-shorthand - userImage: userImage + userName, + userImage }) } const navigate = useNavigate() @@ -66,44 +64,6 @@ const RoomList = () => { setErrorText('連線發生錯誤') }) } - const modalContent = ( -
- ) return (