seepur/resources/scripts/applications/home/views/settings.vue
2020-02-02 17:42:18 -05:00

32 lines
499 B
Vue

<template>
<div class="wrapper">
<h1 class="is-1">Settings {{ user.name }}!!!</h1>
</div>
</template>
<script lang="ts">
let user: {
avatar?: string;
email?: string;
name: string;
isAdmin: boolean;
} = {
name: "LOADING...",
isAdmin: false
};
export default {
name: "Settings",
beforeCreate() {},
async created() {
const response = await fetch("/users/profile/");
this.user = await response.json();
},
data() {
return {
user
};
}
};
</script>