fix: remove stripe metadata and more logos (#11489)

This commit is contained in:
Leo Giovanetti authored and GitHub committed 2023-09-22 14:44:45 -03:00
1 parent f414428dfe
commit 0d653afd0c
7 files changed
+27 -30

No files matched your search

@@ -84,7 +84,7 @@ const ProfileView = () => {
});
const { data: team, isLoading } = trpc.viewer.teams.get.useQuery(
{ teamId },
{ teamId, includeTeamLogo: true },
{
enabled: !!teamId,
onError: () => {
@@ -95,6 +95,7 @@ const ProfileView = () => {
form.setValue("name", team.name || "");
form.setValue("slug", team.slug || "");
form.setValue("bio", team.bio || "");
form.setValue("logo", team.logo || "");
if (team.slug === null && (team?.metadata as Prisma.JsonObject)?.requestedSlug) {
form.setValue("slug", ((team?.metadata as Prisma.JsonObject)?.requestedSlug as string) || "");
}
@@ -167,6 +168,7 @@ const ProfileView = () => {
name: values.name,
slug: values.slug,
bio: values.bio,
logo: values.logo,
};
objectKeys(variables).forEach((key) => {
if (variables[key as keyof typeof variables] === team?.[key]) delete variables[key];