changed form reset and fixed systemvoice
This commit is contained in:
@ -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;
|
||||
};
|
||||
|
Reference in New Issue
Block a user