Remove lots of inline SVGs, use moment.js for times, add some pages for future work

This commit is contained in:
Jai A
2020-10-09 14:25:02 -07:00
parent 3656e6ef54
commit f4a518ce6b
27 changed files with 2167 additions and 417 deletions

36
pages/user/_id.vue Normal file
View File

@@ -0,0 +1,36 @@
<template>
<div>
<img :src="user.avatar_url" />
</div>
</template>
<script>
import axios from 'axios'
export default {
async asyncData(data) {
let res = await axios.get(
`https://api.modrinth.com/api/v1/user/${data.params.id}`
)
const user = res.data
let mods = []
res = await axios.get(
`https://api.modrinth.com/api/v1/user/${data.params.id}/mods`
)
if (res.data) {
res = await axios.get(
`https://api.modrinth.com/api/v1/mods/?ids=${JSON.stringify(res.data)}`
)
mods = res.data
}
return {
mods,
user,
}
},
}
</script>
<style lang="scss"></style>