From 9d8ed0446db902a0c29626dc4e76f5fd9ea2fa4a Mon Sep 17 00:00:00 2001 From: bombies Date: Wed, 25 Oct 2023 22:13:10 -0500 Subject: [PATCH] Fix bug with SelfUserService#getInfo type --- src/app/(site)/components/UserProfile.tsx | 2 +- src/app/(site)/hooks/useMemberInfo.tsx | 2 +- src/app/api/me/self-user.service.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/(site)/components/UserProfile.tsx b/src/app/(site)/components/UserProfile.tsx index 81b8c3f..1d9c202 100644 --- a/src/app/(site)/components/UserProfile.tsx +++ b/src/app/(site)/components/UserProfile.tsx @@ -1,6 +1,6 @@ import {FC} from "react"; import {Avatar, Dropdown, DropdownItem, DropdownMenu, DropdownSection, DropdownTrigger} from "@nextui-org/react"; -import {signOut, useSession} from "next-auth/react"; +import {signOut} from "next-auth/react"; import DashboardIcon from "@/app/(site)/components/icons/DashboardIcon"; import SettingsIcon from "@/app/(site)/components/icons/SettingsIcon"; import useMemberInfo from "@/app/(site)/hooks/useMemberInfo"; diff --git a/src/app/(site)/hooks/useMemberInfo.tsx b/src/app/(site)/hooks/useMemberInfo.tsx index 6ac5c24..7636c8d 100644 --- a/src/app/(site)/hooks/useMemberInfo.tsx +++ b/src/app/(site)/hooks/useMemberInfo.tsx @@ -6,7 +6,7 @@ import {Member} from "@prisma/client"; const useMemberInfo = () => { const {status: sessionStatus} = useSession() - const {data} = useSWR(sessionStatus === 'authenticated' && '/api/me', fetcher) + const {data} = useSWR(sessionStatus === 'authenticated' && '/api/me', fetcher) return data } diff --git a/src/app/api/me/self-user.service.ts b/src/app/api/me/self-user.service.ts index ff38949..97beb0c 100644 --- a/src/app/api/me/self-user.service.ts +++ b/src/app/api/me/self-user.service.ts @@ -6,7 +6,7 @@ import prisma from "@/libs/prisma"; class SelfUserService { - public async getInfo(session: Session): Promise> { + public async getInfo(session: Session): Promise> { if (!session.user) return buildResponse({ status: 403,