diff --git a/pageTemplates/group/GroupBlock.tsx b/pageTemplates/group/GroupBlock.tsx index 5e2f7c723..e4abea7ed 100644 --- a/pageTemplates/group/GroupBlock.tsx +++ b/pageTemplates/group/GroupBlock.tsx @@ -1,6 +1,7 @@ import dayjs from "dayjs"; import Link from "next/link"; import { useSession } from "next-auth/react"; +import { MouseEvent } from "react"; import { useSetRecoilState } from "recoil"; import styled from "styled-components"; @@ -43,8 +44,9 @@ function GroupBlock({ group }: IGroupBlock) { 개설: dayjsToFormat(dayjs(group.createdAt), "YY년 M월 D일"), }; - const onClick = () => { + const onClick = (e: MouseEvent) => { if (isGuest) { + e.preventDefault(); failToast("guest"); return; } @@ -90,8 +92,8 @@ function GroupBlock({ group }: IGroupBlock) { }; return ( - - + onClick(e)}> +
{group.category.main}·{group.category.sub} diff --git a/pageTemplates/user/userProfile.tsx b/pageTemplates/user/userProfile.tsx index 35d32b924..34f0648a6 100644 --- a/pageTemplates/user/userProfile.tsx +++ b/pageTemplates/user/userProfile.tsx @@ -24,8 +24,8 @@ function UserProfile() { return ( <> - - + + 내 친구{" "} @@ -36,8 +36,8 @@ function UserProfile() { - - + + 받은 좋아요{" "} @@ -58,7 +58,7 @@ const Info = styled.div` flex-direction: column; `; -const BlockItem = styled.a` +const BlockItem = styled.div` width: 100%; display: flex; align-items: center; diff --git a/pages/api/auth/[...nextauth].ts b/pages/api/auth/[...nextauth].ts index 903e5aa45..5d7b21e4b 100644 --- a/pages/api/auth/[...nextauth].ts +++ b/pages/api/auth/[...nextauth].ts @@ -141,10 +141,11 @@ export const authOptions: NextAuthOptions = { if (account && account.provider === "guest") { token = { ...token, - id: "0", - uid: "0", + id: "66f29811e0f0564ae35c52a4", + uid: "1234567890", name: "guest", role: "guest", + location: "수원", isActive: false, profileImage: "", }; diff --git a/pages/group/index.tsx b/pages/group/index.tsx index 75d69ca90..593f85d7b 100644 --- a/pages/group/index.tsx +++ b/pages/group/index.tsx @@ -118,7 +118,8 @@ function GroupPage() { }, [category.sub, groups]); useEffect(() => { - if (!isGuest && groupStudies.length && !myGroups) { + if (isGuest) setMyGroups([]); + else if (groupStudies.length && !myGroups) { setMyGroups( groupStudies.filter((item) => item.participants.some((who) => { @@ -150,7 +151,7 @@ function GroupPage() { function StatusSelector() { return ; } - + console.log(24, myGroups); return ( <>