From 90457e4ea6dd1c6d8036f7b4d2d62551f998284e Mon Sep 17 00:00:00 2001 From: lim Date: Wed, 14 Feb 2024 00:17:26 +0900 Subject: [PATCH] [frontend] Fixed function names and eliminated unnecessary argument --- frontend/app/ui/room/ban-item.tsx | 6 +++--- frontend/app/ui/room/unban-item.tsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/app/ui/room/ban-item.tsx b/frontend/app/ui/room/ban-item.tsx index d001fc96..9de2414a 100644 --- a/frontend/app/ui/room/ban-item.tsx +++ b/frontend/app/ui/room/ban-item.tsx @@ -26,9 +26,9 @@ export default function BanItem({ const router = useRouter(); const [isClicked, setIsClicked] = useState(false); - const onBan = async (userId: number) => { + const ban = async () => { setIsClicked(true); - const result = await banUser(roomId, userId); + const result = await banUser(roomId, user.id); if (result === "Success") { router.refresh(); } else { @@ -48,7 +48,7 @@ export default function BanItem({ {isClicked && } {!isClicked && (