diff --git a/src/types/Profile.ts b/src/types/Profile.ts index 2b98113a..ec8b5e7a 100644 --- a/src/types/Profile.ts +++ b/src/types/Profile.ts @@ -1,5 +1,6 @@ import type { User } from "@/types/User"; import { type Nullable } from "@/types/utils"; +import { IMG_DEFAULT_PROFILE } from "@/utils/assets"; export type Gender = "M" | "F" | "O"; export const GenderOptions: {[k in Gender]: string} = { @@ -56,7 +57,7 @@ export class ProfileClass implements Profile { */ get imageUrl() { if (this.image === null) - return null; + return IMG_DEFAULT_PROFILE; return import.meta.env.VITE_UNIVERSIME_API + "/profile/image/" + this.id; } diff --git a/src/utils/assets.ts b/src/utils/assets.ts index 05c11815..15d27b19 100644 --- a/src/utils/assets.ts +++ b/src/utils/assets.ts @@ -1,5 +1,6 @@ -export const IMG_UNIVERSI_LOGO = "/assets/imgs/universi-me2.png"; -export const IMG_DCX_LOGO = "/assets/imgs/dcx-png 1.png"; +export const IMG_UNIVERSI_LOGO = "/assets/imgs/universi-me2.png"; +export const IMG_DCX_LOGO = "/assets/imgs/dcx-png 1.png"; +export const IMG_DEFAULT_PROFILE = "/assets/imgs/default_avatar.png"; export const ICON_CHEVRON_DOWN = "/assets/icons/chevron-down-1.svg"; export const ICON_CHEVRON_UP_BLACK = "/assets/icons/chevron-up-black.svg";