const { data } = await authClient.useSession()
This expression is not callable.
No constituent of type 'Atom<{ data: { user: { id: string; name: string; email: string; emailVerified: boolean; createdAt: Date; updatedAt: Date; image?: string | null | undefined; pincode: string; gender: string; ... 4 more ...; banExpires?: Date | ... 1 more ... | undefined; }; session: { ...; }; } | null; error: BetterFetchError | null;...' is callable.ts(2349)
2 Replies
Solution
useSession is meant to be used like a hook
try getSession