mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-06 13:40:16 +08:00
impr: remove report button when viewing your own public profile
closes #5998
This commit is contained in:
parent
9306e1ecf5
commit
a5cd1d38e4
1 changed files with 7 additions and 0 deletions
|
@ -14,6 +14,7 @@ import Format from "../utils/format";
|
|||
import { UserProfile, RankAndCount } from "@monkeytype/contracts/schemas/users";
|
||||
import { abbreviateNumber, convertRemToPixels } from "../utils/numbers";
|
||||
import { secondsToString } from "../utils/date-and-time";
|
||||
import { Auth } from "../firebase";
|
||||
|
||||
type ProfileViewPaths = "profile" | "account";
|
||||
type UserProfileOrSnapshot = UserProfile | DB.Snapshot;
|
||||
|
@ -331,6 +332,12 @@ export async function update(
|
|||
}
|
||||
}
|
||||
|
||||
if (profile.uid === Auth?.currentUser?.uid) {
|
||||
profileElement.find(".userReportButton").addClass("hidden");
|
||||
} else {
|
||||
profileElement.find(".userReportButton").removeClass("hidden");
|
||||
}
|
||||
|
||||
//structure
|
||||
|
||||
const bioAndKey = bio || keyboard;
|
||||
|
|
Loading…
Add table
Reference in a new issue