You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
439 B

  1. <template>
  2. <div>
  3. <ul v-for="mountain in mountains" :key="mountain.id">
  4. <NuxtLink :to="`${mountain.continent.toLowerCase()}/${mountain.slug}`">
  5. <li>{{ mountain.title }}</li>
  6. </NuxtLink>
  7. </ul>
  8. </div>
  9. </template>
  10. <script>
  11. export default {
  12. async asyncData () {
  13. const mountains = await fetch(
  14. 'https://api.nuxtjs.dev/mountains'
  15. ).then(res => res.json())
  16. return { mountains }
  17. }
  18. }
  19. </script>