[Vuejs]-How to load a dynamic image from a url in Nuxt3?

1👍

It should be defined as a computed property since it depends on the value of the other property (do the same thing for name) :

<script setup>

  import { useAuth0 } from '@auth0/auth0-vue';
  
  let auth0 = process.client ? useAuth0() : undefined;

  const name = computed(()=>auth0?.isAuthenticated ? auth0?.user?.value.nickname:'');
  const image = computed(()=>auth0?.isAuthenticated ? auth0?.user?.value.picture:'');


</script>

Leave a comment