fix(components): fix how the genre atom destructures fetched data
This commit is contained in:
		
							parent
							
								
									d7eb7eaec8
								
							
						
					
					
						commit
						cc28b65063
					
				| @ -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, | ||||
| 	})); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user