<template>
  <div class="home">
    <ContainerList :containers="containers"/>

    <Editor />
  </div>
</template>

<script>
import ContainerList from '../components/ContainerList'
import { getContainers } from '../lib/api'
import { ref } from 'vue'
import Editor from '../components/Editor'

export default {
  name: 'Dashboard',
  components: { Editor, ContainerList },
  setup () {
    const containers = ref([])

    getContainers()
      .then(c => {
        containers.value = c
      })

    return {
      containers: containers
    }
  }
}
</script>
