{$_("common.back")}
{#if data.isOwnProfile}
{$_("profile.edit")}
{/if}
{#if data.user.avatar}
{:else}
{displayName.charAt(0).toUpperCase()}
{/if}
{displayName}
{$_("profile.member_since", { values: { date: joinDate }, })}
{#if data.user.description}
{data.user.description}
{/if}
{data.stats.comments_count}
{$_("profile.comments")}
{data.stats.likes_count}
{$_("profile.likes")}
{#if data.gamification?.stats}
{$_("gamification.stats")}
{$_("gamification.leaderboard")}
{Math.round(data.gamification.stats.total_weighted_points ?? 0)}
{$_("gamification.points")}
#{data.gamification.stats.rank}
{$_("gamification.rank")}
{data.gamification.stats.recordings_count}
{$_("gamification.recordings")}
{data.gamification.stats.playbacks_count}
{$_("gamification.plays")}
{#if data.gamification.achievements?.length > 0}
{$_("gamification.achievements")} ({data.gamification.achievements.length})
{#each data.gamification?.achievements ?? [] as achievement (achievement.id)}
{achievement.icon || "🏆"}
{achievement.name}
{#if achievement.date_unlocked}
{new Date(achievement.date_unlocked).toLocaleDateString( $locale ?? undefined, )}
{/if}
{/each}
{:else}
No achievements unlocked yet
{/if}
{/if}