Types error with Image component and NextAuth session

Hey, so I'm trying to display user image but typescript yells at me Type error: Type 'string | null | undefined' is not assignable to type 'string | StaticImport' Component looks like this:
<Image
> 20 | src={session?.user?.image}
| ^
21 | width={100}
22 | height={100}
23 | className={`h-7 w-7 rounded-full`}
<Image
> 20 | src={session?.user?.image}
| ^
21 | width={100}
22 | height={100}
23 | className={`h-7 w-7 rounded-full`}
4 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
noctate
noctateOP3y ago
yea but what can I do about it? I've tried to change the type but in vercel production it still throws error
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
noctate
noctateOP3y ago
thanks!
Want results from more Discord servers?
Add your server