{userProfile ? (
-
- {userProfile?.displayName}
-
+
+
+ {userProfile?.displayName}
+
+
+
) : (
)}
diff --git a/src/renderer/src/pages/profile/profile-hero/user-badges.tsx b/src/renderer/src/pages/profile/profile-hero/user-badges.tsx
new file mode 100644
index 00000000..ed5d0571
--- /dev/null
+++ b/src/renderer/src/pages/profile/profile-hero/user-badges.tsx
@@ -0,0 +1,40 @@
+import BadgeThemeCreator from "@renderer/assets/icons/badge-theme-creator.svg?react";
+import "./profile-hero.scss";
+import { useContext } from "react";
+import { userProfileContext } from "@renderer/context";
+import { UserBadge } from "@types";
+import { useTranslation } from "react-i18next";
+
+export function UserBadges() {
+ const { t } = useTranslation("badge");
+ const { userProfile } = useContext(userProfileContext);
+
+ if (!userProfile?.badges?.length) return null;
+
+ const getBadgeIcon = (badge: UserBadge) => {
+ if (badge === "THEME_CREATOR") {
+ return
;
+ }
+
+ return null;
+ };
+
+ return (
+
+ {userProfile.badges.map((badge) => {
+ const badgeIcon = getBadgeIcon(badge);
+
+ if (!badgeIcon) return null;
+ return (
+
+ {badgeIcon}
+
+ );
+ })}
+
+ );
+}
diff --git a/src/types/index.ts b/src/types/index.ts
index 53fb97dc..e17a694a 100644
--- a/src/types/index.ts
+++ b/src/types/index.ts
@@ -130,6 +130,8 @@ export interface UserProfileCurrentGame extends Omit
{
export type ProfileVisibility = "PUBLIC" | "PRIVATE" | "FRIENDS";
+export type UserBadge = "THEME_CREATOR";
+
export interface UserDetails {
id: string;
username: string;
@@ -164,6 +166,7 @@ export interface UserProfile {
quirks: {
backupsPerGameLimit: number;
};
+ badges: UserBadge[];
}
export interface UpdateProfileRequest {