fixed version selection default value and added proper avatar names to the dropdown preview

This commit is contained in:
Polaris
2024-08-26 15:03:50 -04:00
parent 90ae8fc48c
commit 4a7dae218b
7 changed files with 68 additions and 48 deletions

View File

@ -66,6 +66,7 @@ export const TrophyCustomization: FC<AvatarSelectionProps> = ({
const data = await getCurrentTrophies();
if (data.length > 0) {
setTrophyId(data[0].trophyId!);
form.setValue("trophies", data[0].trophyId as number);
}
} catch (error) {
console.error("Error fetching avatar parts:", error);
@ -118,7 +119,7 @@ export const TrophyCustomization: FC<AvatarSelectionProps> = ({
variant="outline"
role="combobox"
className={cn(
"w-[300px] justify-between",
"w-[400px] justify-between",
!field.value && "text-muted-foreground",
)}
>
@ -131,7 +132,7 @@ export const TrophyCustomization: FC<AvatarSelectionProps> = ({
</Button>
</FormControl>
</PopoverTrigger>
<PopoverContent className="w-[300px] p-0">
<PopoverContent className="w-[400px] p-0">
<Command>
<CommandList>
<CommandEmpty>No avatar part found.</CommandEmpty>