{#if !hidePage && hideTimeline}
@@ -29,7 +29,7 @@
import LazyTimeline from './timeline/LazyTimeline.html'
import { store } from '../_store/store.js'
import LoadingPage from './LoadingPage.html'
- import ComposeBox from './compose/ComposeBox.html'
+ import LazyComposeBox from './compose/LazyComposeBox.html'
export default {
oncreate () {
@@ -44,9 +44,9 @@
},
store: () => store,
components: {
+ LazyComposeBox,
LazyTimeline,
- LoadingPage,
- ComposeBox
+ LoadingPage
}
}
diff --git a/src/routes/_components/compose/LazyComposeBox.html b/src/routes/_components/compose/LazyComposeBox.html
new file mode 100644
index 0000000..1238c83
--- /dev/null
+++ b/src/routes/_components/compose/LazyComposeBox.html
@@ -0,0 +1,16 @@
+{#await importComposeBox}
+
+{:then ComposeBox}
+
+{:catch error}
+
Component failed to load. Try refreshing! {error}
+{/await}
+
diff --git a/src/routes/_utils/asyncModules.js b/src/routes/_utils/asyncModules.js
index 9950e1a..35e1df8 100644
--- a/src/routes/_utils/asyncModules.js
+++ b/src/routes/_utils/asyncModules.js
@@ -43,3 +43,7 @@ export const importToast = () => import(
export const importSnackbar = () => import(
/* webpackChunkName: 'Snackbar.html' */ '../_components/snackbar/Snackbar.html'
).then(getDefault)
+
+export const importComposeBox = () => import(
+ /* webpackChunkName: 'ComposeBox.html' */ '../_components/compose/ComposeBox.html'
+ ).then(getDefault)