changed form reset and fixed systemvoice

This commit is contained in:
Polaris
2024-08-26 20:06:33 -04:00
parent bfe2403076
commit e22708f98a
9 changed files with 19 additions and 79 deletions

View File

@ -142,14 +142,11 @@ export const AvatarCustomization: FC<AvatarSelectionProps> = ({
toast({
title: "Avatar updated successfully!",
description: (
<pre className="mt-2 w-[340px] rounded-md bg-slate-950 p-4">
<code className="text-white">
{JSON.stringify(data, null, 2)}
</code>
<pre className="mt-2 w-[340px] rounded-md p-4">
<div className="text-white">Avatar updated</div>
</pre>
),
});
resetFormValues();
})
.catch((error) => {
toast({
@ -160,15 +157,6 @@ export const AvatarCustomization: FC<AvatarSelectionProps> = ({
});
}
function resetFormValues() {
form.reset({
AvatarHeadAccessory: undefined,
AvatarFaceAccessory: undefined,
AvatarItemAccessory: undefined,
AvatarBackAccessory: undefined,
AvatarWearAccessory: undefined,
});
}
const getTexture = (id: number | undefined, defaultSrc: string) => {
return id ? getAvatarTextureSrc(id) : defaultSrc;
};