dont req for username of built in users

This commit is contained in:
mbecker20
2024-05-10 17:14:55 -07:00
parent 5e7445b10d
commit 37224ee1ad

View File

@@ -23,6 +23,13 @@ import { sanitizeOnlySpan, usableResourcePath, version_is_none } from "@lib/util
import { UsableResource } from "@types";
export const UpdateUser = ({ user_id }: { user_id: string }) => {
if (user_id === "Procedure") return <>{user_id}</>;
if (user_id === "Github") return <>{user_id}</>;
if (user_id === "Auto Redeploy") return <>{user_id}</>;
return <RealUpdateUser user_id={user_id} />;
};
const RealUpdateUser = ({ user_id }: { user_id: string }) => {
const username = useRead("GetUsername", { user_id }).data?.username;
return <>{username || user_id}</>;
};