fixed customization erros all using avatar instead of respected item

This commit is contained in:
Polaris
2024-08-26 16:38:35 -04:00
parent 23fe043cf1
commit 81b8a88397
4 changed files with 8 additions and 18 deletions

View File

@ -15,7 +15,6 @@ import {
import {
Form,
FormControl,
FormDescription,
FormField,
FormItem,
FormLabel,
@ -32,10 +31,6 @@ import { zodResolver } from "@hookform/resolvers/zod";
import { toast } from "../../ui/use-toast";
import { getCurrentTrophies, updatePlayerTrophy } from "./actions";
import { cozynet_chuni_static_trophies } from "@/prisma/schemas/artemis/generated/artemis";
const getAvatarTextureSrc = (id: number | undefined) => {
if (id === undefined) return "";
return `avatarAccessory/CHU_UI_Avatar_Tex_0${id}.png`;
};
type static_trophies = cozynet_chuni_static_trophies;
@ -69,7 +64,7 @@ export const TrophyCustomization: FC<AvatarSelectionProps> = ({
form.setValue("trophies", data[0].trophyId as number);
}
} catch (error) {
console.error("Error fetching avatar parts:", error);
console.error("Error fetching trophies:", error);
}
};
@ -135,7 +130,7 @@ export const TrophyCustomization: FC<AvatarSelectionProps> = ({
<PopoverContent className="w-[400px] p-0">
<Command>
<CommandList>
<CommandEmpty>No avatar part found.</CommandEmpty>
<CommandEmpty>No trophies part found.</CommandEmpty>
<CommandGroup>
{playerTrophySelectionData.statictrophies.map(
(part) => (