You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.3 KiB

<app-hub-index>
<div class="view">
<div class="m-top-3 m-bottom-4">
<app-hub-create></app-hub-create>
</div>
<div class="hub">
<div class="hub__item m-bottom-3" each={ hub in state.hubs }>
<a href="/hub/{ hub._id }">
<div class="panel">
<div class="panel__body">
<h3 class="h5 m-bottom-0">{ hub.name }</h3>
<p if={ hub.description }>
{ hub.description }
</p>
</div>
</div>
</a>
</div>
</div>
<app-hub-form></app-hub-form>
</div>
<script>
import hubStore from './../../stores/hub.js'
/**
* handle open and close of form for tasks
*
*
* @author Björn Hase, <me@herr-hase.wtf>
*
*/
export default {
state: {
hubs: []
},
onMounted()
{
hubStore.on('update', (data) => {
this.state.hubs = data
this.update()
})
hubStore.get()
}
}
</script>
</app-hub-index>