Fix null coalescing on user page

This commit is contained in:
Stedoss 2024-07-05 18:04:21 +01:00
parent 7bb7b5c39a
commit 0df62d926e
2 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ export function getMockReplayData(): ReplayData {
export interface ReplayData {
replay_id: number | null;
user_id: number;
user_id: number | null;
username: string;
date: string;
beatmap_id: number;

View File

@ -33,7 +33,7 @@
</div>
</div>
<div class="score-player__row score-player__row--player mt-2">
Played by <a [routerLink]="['/u/' + this.replayData.user_id ?? this.replayData.username]">{{ this.replayData.username }}</a> <a *ngIf="this.replayData.user_id" class="btn" style="margin-left: 5px" href="https://osu.ppy.sh/users/{{ this.replayData.user_id }}" target="_blank">osu!web</a>
Played by <a [routerLink]="['/u/' + (this.replayData.user_id ?? this.replayData.username)]">{{ this.replayData.username }}</a> <a *ngIf="this.replayData.user_id" class="btn" style="margin-left: 5px" href="https://osu.ppy.sh/users/{{ this.replayData.user_id }}" target="_blank">osu!web</a>
<ng-container *ngIf="!this.isUserScore">
<br>
Submitted on <strong>{{ this.replayData.date }}</strong>