Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🐛 Fix name change (#1384)
Luke Vellac3396020cff6
diff --git a/apps/web/src/app/[locale]/(admin)/settings/profile/profile-settings.tsx b/apps/web/src/app/[locale]/(admin)/settings/profile/profile-settings.tsxindex 2cb9b0487..09f259011 100644--- a/apps/web/src/app/[locale]/(admin)/settings/profile/profile-settings.tsx+++ b/apps/web/src/app/[locale]/(admin)/settings/profile/profile-settings.tsx@@ -12,10 +12,11 @@ import { useForm } from "react-hook-form";import { ProfilePicture } from "@/app/[locale]/(admin)/settings/profile/profile-picture";import { Trans } from "@/components/trans";import { useUser } from "@/components/user-provider";+import { trpc } from "@/utils/trpc/client";export const ProfileSettings = () => {const { user, refresh } = useUser();-+ const changeName = trpc.user.changeName.useMutation();const form = useForm<{name: string;email: string;@@ -32,7 +33,8 @@ export const ProfileSettings = () => {<Form {...form}><formonSubmit={handleSubmit(async (data) => {- await refresh({ name: data.name });+ await changeName.mutateAsync({ name: data.name });+ await refresh();reset(data);})}>