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

@ -67,6 +67,7 @@ export const NameplateCustomization: FC<AvatarSelectionProps> = ({
const data = await getCurrentNameplate();
if (data.length > 0) {
setNameplateId(data[0].nameplateId!);
form.setValue("nameplateId", data[0].nameplateId as number);
}
} catch (error) {
console.error("Error fetching avatar parts:", error);
@ -141,7 +142,7 @@ export const NameplateCustomization: FC<AvatarSelectionProps> = ({
variant="outline"
role="combobox"
className={cn(
"w-[300px] justify-between",
"w-[400px] justify-between",
!field.value && "text-muted-foreground",
)}
>
@ -154,7 +155,7 @@ export const NameplateCustomization: FC<AvatarSelectionProps> = ({
</Button>
</FormControl>
</PopoverTrigger>
<PopoverContent className="w-[300px] p-0">
<PopoverContent className="w-[400px] p-0">
<Command>
<CommandList>
<CommandEmpty>No name plate found.</CommandEmpty>