<template>
  <div>
    <div v-for="program in programs" :key="program.id">
        <router-link :to="`/subscribe/${program.code}`">{{ program }}</router-link>
    </div>
  </div>
</template>

<script>

export default {
  data(){
    return {
      programs: {}
    }
  },

  created() {
    this.$axios.get(`${process.env.VUE_APP_GOSUBS_HOST}/api/programs/`)
      .then(r => this.programs = r.data.programs )
      .catch(); // todo
  }
}
</script>

<style>

</style>