mirror of
https://github.com/kevin-DL/build-gmail-clone-with-vue-3.git
synced 2026-01-16 12:54:42 +00:00
25 lines
434 B
Vue
25 lines
434 B
Vue
<template>
|
|
<h1>VMail Inbox</h1>
|
|
|
|
<MailTable :emails="emails" />
|
|
</template>
|
|
|
|
<script>
|
|
import MailTable from '@/components/MailTable.vue';
|
|
import { ref } from 'vue';
|
|
export default {
|
|
async setup(props, {attrs, slots}){
|
|
let response = await fetch('/api/emails');
|
|
let {emails} = await response.json();
|
|
|
|
return {emails}
|
|
},
|
|
components: {
|
|
MailTable
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped>
|
|
|
|
</style> |