mirror of
https://github.com/kevin-DL/build-gmail-clone-with-vue-3.git
synced 2026-01-11 18:54:31 +00:00
Fix: Make emails and openedEmail reactive references
This commit is contained in:
@@ -24,14 +24,15 @@
|
||||
import { format } from 'date-fns';
|
||||
import axios from 'axios';
|
||||
import MailView from '@/components/MailView.vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
export default {
|
||||
async setup(){
|
||||
let {data: emails} = await axios.get('http://localhost:3000/emails')
|
||||
return {
|
||||
format,
|
||||
emails,
|
||||
openedEmail: null
|
||||
emails: ref(emails),
|
||||
openedEmail: ref(null)
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
||||
Reference in New Issue
Block a user