From c55020848f98c284f55164ee03972594939440c2 Mon Sep 17 00:00:00 2001 From: LSJ Date: Thu, 7 Nov 2024 15:38:45 +0900 Subject: [PATCH] fix error --- pageTemplates/group/detail/GroupHeader.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pageTemplates/group/detail/GroupHeader.tsx b/pageTemplates/group/detail/GroupHeader.tsx index e48a3fe3..310ca899 100644 --- a/pageTemplates/group/detail/GroupHeader.tsx +++ b/pageTemplates/group/detail/GroupHeader.tsx @@ -1,5 +1,5 @@ -import { useRouter } from "next/router"; import { useSession } from "next-auth/react"; +import { useRouter } from "next/router"; import { useState } from "react"; import { useQueryClient } from "react-query"; import { useSetRecoilState } from "recoil"; @@ -24,7 +24,7 @@ function GroupHeader({ group }: IGroupHeader) { const completeToast = useCompleteToast(); const router = useRouter(); const isAdmin = group.organizer.uid === session?.user.uid; - const isMember = group.participants.some((par) => par.user.uid === session?.user.uid); + const isMember = group.participants.some((par) => par.user?.uid === session?.user.uid); const [isSettigModal, setIsSettingModal] = useState(false); const setTransferGroup = useSetRecoilState(transferGroupDataState);