mirror of
https://github.com/nolanlawson/pinafore
synced 2024-12-14 19:38:28 +01:00
30 lines
776 B
HTML
30 lines
776 B
HTML
<div class="lazy-timeline">
|
|
{{#await importTimeline}}
|
|
{{then constructor}}
|
|
<:Component {constructor} :timeline />
|
|
{{catch error}}
|
|
<div>Component failed to load. Try refreshing! {{error}}</div>
|
|
{{/await}}
|
|
</div>
|
|
<style>
|
|
.lazy-timeline {
|
|
width: 100%;
|
|
}
|
|
</style>
|
|
<script>
|
|
import { importTimeline } from '../../_utils/asyncModules'
|
|
import { store } from '../../_store/store'
|
|
|
|
export default {
|
|
oncreate() {
|
|
let instanceName = this.store.get('currentInstance')
|
|
let timeline = this.get('timeline')
|
|
this.store.set({currentTimeline: timeline})
|
|
this.store.setForTimeline(instanceName, timeline, {runningUpdate: false})
|
|
},
|
|
store: () => store,
|
|
data: () => ({
|
|
importTimeline: importTimeline()
|
|
})
|
|
}
|
|
</script> |