Image of the session model being accessed in the file When attempting to retrieve the user from the session model in MongoDB using Prisma, only the user value is not displaying ( id: string; sessionToken: string; userId: string; expires: Date;). I have stored the user in the session model but it is not appearing as expected.
Here is the schema.prisma file:
generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "mongodb"
url = env("DATABASE_URL")
}
model Product {
// Model fields
}
// Other models
model User {
// Model fields
}
model Session {
// Model fields
}
model VerificationToken {
// Model fields
}
This is where the user access is attempted:
// Code snippet for accessing user from session
Error message received: Property 'user' does not exist on type 'UserMenuButtonProps'.ts(2339)