diff --git a/src/components/BulkActionBar.vue b/src/components/BulkActionBar.vue index bf881a0..7b755cd 100644 --- a/src/components/BulkActionBar.vue +++ b/src/components/BulkActionBar.vue @@ -30,7 +30,7 @@ export default { setup({emails}){ - let { emailSelection } = useEmailSelection(); + let emailSelection = useEmailSelection(); let numberSelected = computed(() => { return emailSelection.emails.size; diff --git a/src/components/MailScreen.vue b/src/components/MailScreen.vue index fbd2923..935eb4b 100644 --- a/src/components/MailScreen.vue +++ b/src/components/MailScreen.vue @@ -27,12 +27,11 @@ let response = await axios.get('http://localhost:3000/emails'); let emails = response.data; let selectedScreen = 'archive'; - let {emailSelection} = useEmailSelection(); return { emails, selectedScreen, - emailSelection + emailSelection: useEmailSelection() } }, components: { diff --git a/src/components/MailTable.vue b/src/components/MailTable.vue index bbf6884..30cc41f 100644 --- a/src/components/MailTable.vue +++ b/src/components/MailTable.vue @@ -35,13 +35,10 @@ export default { async setup(){ - let openedEmail = null; - let { emailSelection } = useEmailSelection(); - return { format, - openedEmail, - emailSelection + openedEmail: null, + emailSelection: useEmailSelection() } }, components: { diff --git a/src/composition/useEmailSelection.js b/src/composition/useEmailSelection.js index 907b1da..321308f 100644 --- a/src/composition/useEmailSelection.js +++ b/src/composition/useEmailSelection.js @@ -35,7 +35,7 @@ export const useEmailSelection = function(){ moveToInbox(){ forSelected(e => e.archived = false); clear();} } - return { emailSelection } + return emailSelection } export default useEmailSelection; \ No newline at end of file