fix(components): fix how the genre atom destructures fetched data

This commit is contained in:
parent d7eb7eaec8
commit cc28b65063
Signed by: tablet
GPG Key ID: 924A5F6AF051E87C

@ -1,8 +1,8 @@
<script lang="ts" setup>
import { useField } from "vee-validate";
const fname = inject<string>("curName");
let data = await useApiFetch("/genres");
let opts = (data.data.value as unknown as any[]).map((a) => ({
let { data: data } = await useApiFetch("/genres");
let opts = (data.value as unknown as any[]).map((a) => ({
value: a,
label: a,
}));