Get all contacts on mounted

This commit is contained in:
Eli Ribble 2026-05-22 13:58:21 +00:00
parent cecb9ef0f0
commit a72f228e4e
No known key found for this signature in database

View file

@ -16,7 +16,7 @@
</ThreeColumn> </ThreeColumn>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from "vue"; import { onMounted, ref } from "vue";
import { computedAsync } from "@vueuse/core"; import { computedAsync } from "@vueuse/core";
import ThreeColumn from "@/components/layout/ThreeColumn.vue"; import ThreeColumn from "@/components/layout/ThreeColumn.vue";
@ -34,4 +34,7 @@ const selectedContact = ref<Contact | undefined>(undefined);
const handleSelectionChange = (selection: Contact | undefined) => { const handleSelectionChange = (selection: Contact | undefined) => {
selectedContact.value = selection; selectedContact.value = selection;
}; };
onMounted(async () => {
await storeResource.contact.fetchAll();
});
</script> </script>