<template>
  <div></div>
</template>
<script>
import pages from '../data/pages.json';
import loadFonts from '../utils/loadFonts';

export default {
  created(){
    const _pages = {};
    pages.data.pages.forEach(page => {
      _pages[page.id] = page;
    });
    pages.data.pages = _pages;
    this.$store.dispatch('setPage', pages.data).then(async () => {
      await loadFonts(pages.data.config.fonts);
      this.$router.push('/page/demo/main');
    })
  }
}
</script>
