#Why does my page render on `refresh` but not on `pageswitch`
25 messages · Page 1 of 1 (latest)
You can use this:
<script setup>
const { data } = await useFetch('https://uebler.limitless.digital/items/Home', {
mode: 'no-cors',
params: {
fields: [
'Introblok_titel',
'Introblok_beschrijving',
'Hero_Foto.*',
'Hero_Auto.*',
'Algemene_Informatie.item.*',
'Usps.*.*',
],
},
})
</script>
<template><div>{{data.data.Hero_Foto }}</div></template>
sure this is not a problem with the api
because the first is from the server and the second one would be client only
as example this works fine https://pokeapi.co/api/v2/pokemon-species/aegislash
i think api does not allow requests from localhost maybe
maybe use a proxie
maybe try thsi https://vitejs.dev/config/server-options.html#server-proxy
nvm i think this is not the solution
Yup, on live it works. So just refresh on "Dev?
its an api issue