mirror of
https://github.com/kevin-DL/build-gmail-clone-with-vue-3.git
synced 2026-01-21 14:55:00 +00:00
Bare app - remove everything except styling, db.json, and packages
This commit is contained in:
@@ -1,35 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<component :is="screenName" :emails="emails.sort((e1, e2) => e1.sentAt < e2.sentAt ? 1 : -1)" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import MailScreenArchived from '@/components/MailScreenArchived.vue';
|
||||
import MailScreenInbox from '@/components/MailScreenInbox.vue';
|
||||
import { ref } from 'vue';
|
||||
import axios from 'axios';
|
||||
|
||||
export default {
|
||||
async setup(){
|
||||
let {data} = await axios.get('http://localhost:3000/emails');
|
||||
let emails = ref(data);
|
||||
|
||||
return {emails};
|
||||
},
|
||||
components: {
|
||||
MailScreenArchived,
|
||||
MailScreenInbox
|
||||
},
|
||||
props: {
|
||||
screenName: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user