fixed customization erros all using avatar instead of respected item
This commit is contained in:
@ -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) => (
|
||||
|
Reference in New Issue
Block a user