cosmos-explorer/src/main.ts

36 lines
1.0 KiB
TypeScript
Raw Normal View History

2023-04-03 09:08:02 +00:00
/* eslint-disable import/order */
2023-05-09 16:35:51 +00:00
import 'ping-widget';
2023-04-24 15:12:08 +00:00
import '@/plugins/vuetify/@iconify/icons-bundle';
import App from '@/App.vue';
import layoutsPlugin from '@/plugins/vuetify/layouts';
import vuetify from '@/plugins/vuetify';
import i18n from '@/plugins/i18n';
import { loadFonts } from '@/plugins/vuetify/webfontloader';
import '@/plugins/vuetify/@core/scss/template/index.scss';
import '@/plugins/vuetify/styles/styles.scss';
import '@/style.css';
import { createApp } from 'vue';
import { createPinia } from 'pinia';
2023-05-10 17:53:59 +00:00
import LazyLoad from 'lazy-load-vue3';
2023-04-03 09:08:02 +00:00
// import router from "@/plugins/vuetify/router";
2023-04-24 15:12:08 +00:00
import router from './router';
import { useBaseStore } from './stores/useBaseStore';
2023-04-03 09:08:02 +00:00
loadFonts();
// Create vue app
const app = createApp(App);
// Use plugins
2023-04-24 15:12:08 +00:00
app.use(i18n);
2023-04-03 09:08:02 +00:00
app.use(vuetify);
app.use(createPinia());
app.use(layoutsPlugin);
app.use(router);
2023-05-10 17:53:59 +00:00
app.use(LazyLoad, { component: true });
2023-04-03 09:08:02 +00:00
// Mount vue app
2023-04-24 15:12:08 +00:00
app.mount('#app');
2023-04-03 09:08:02 +00:00
// fetch latest block every 6s
2023-05-14 01:23:18 +00:00
const blockStore = useBaseStore()
setInterval(() => {blockStore.fetchLatest()}, 6000)