impr: remove report button when viewing your own public profile

closes #5998
This commit is contained in:
Miodec 2024-11-04 12:09:05 +01:00
parent 9306e1ecf5
commit a5cd1d38e4

View file

@ -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;