#Why does my page render on `refresh` but not on `pageswitch`

25 messages · Page 1 of 1 (latest)

tidal heart
#

I'm using ```

<script setup>```

daring rune
#

is in the console something

#

can you make a reproduction

tidal heart
#

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>

daring rune
#

what is the sturcute

#

routes

tidal heart
#

index.vue

#

pages/index.vue

#

and pages/test.vue -> can be empty

daring rune
#

sure this is not a problem with the api

#

because the first is from the server and the second one would be client only

#

i think api does not allow requests from localhost maybe

#

maybe use a proxie

#

nvm i think this is not the solution

tidal heart
#

Yup, on live it works. So just refresh on "Dev?

daring rune
#

its an api issue

tidal heart
#

How?

#

What do you mean @daring rune api returns 200

daring rune
#

i dont know

#

yes

#

but it just returns 200 with nothing

#

you have to allow localhost or something