Skip to content

Commit

Permalink
fix: pfp image can actually be null
Browse files Browse the repository at this point in the history
  • Loading branch information
FusionSid committed Sep 6, 2024
1 parent fcd2a9d commit 235ef28
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/core/components/teacherSidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ const DashboardSidebar = () => {
<div className="-mx-2 mt-6 flex flex-col items-center">
<Image
className="mx-2 h-24 w-24 rounded-full object-cover"
src={session.data.user.image}
src={
session.data.user.image ||
"https://lh3.googleusercontent.com/-XdUIqdMkCWA/AAAAAAAAAAI/AAAAAAAAAAA/4252rscbv5M/photo.jpg"
}
width={96}
height={96}
unoptimized
Expand Down
2 changes: 1 addition & 1 deletion src/core/db/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ model User {
id String @id @default(cuid())
name String
email String @unique
image String
image String?
emailVerified DateTime? @map("email_verified")
isOnboarded Boolean @default(false) @map("is_onboarded")
kamarPassword String? @map("kamar_password")
Expand Down

0 comments on commit 235ef28

Please sign in to comment.