<template>
    <div class="chat-app">
        <Conversation :contact="selectedContact" :messages="messages"/>
        <ContactsList :contact="contacts"/>
    </div>
</template>

<script>
    export default {
        data(){
            return{
                selectedContacts:null,
                messages: [],
                contacts: [],
            }
        },
        mounted() {
            axios.get('/contacts')
                .then((responce)=> {
                console.log(responce.data);
                    this.contacts = responce.data;

                });
        }
    }
</script>