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.
|
<template>
|
|
<div>
|
|
<ul v-for="mountain in mountains" :key="mountain.id">
|
|
<NuxtLink :to="`${mountain.continent.toLowerCase()}/${mountain.slug}`">
|
|
<li>{{ mountain.title }}</li>
|
|
</NuxtLink>
|
|
</ul>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
async asyncData () {
|
|
const mountains = await fetch(
|
|
'https://api.nuxtjs.dev/mountains'
|
|
).then(res => res.json())
|
|
|
|
return { mountains }
|
|
}
|
|
}
|
|
</script>
|