mirror of
https://github.com/Sped0n/bridget.git
synced 2026-04-17 03:29:31 -07:00
23 lines
633 B
TypeScript
23 lines
633 B
TypeScript
import { initContainer } from './container'
|
|
import { initNav } from './nav'
|
|
import { initResources } from './resources'
|
|
import { initState } from './state'
|
|
import { isMobile } from './utils'
|
|
|
|
initContainer()
|
|
const ijs = initResources()
|
|
initState(ijs.length)
|
|
initNav()
|
|
|
|
// NOTE: it seems firefox and chromnium don't like top layer await
|
|
// so we are using import then instead
|
|
if (ijs.length > 0) {
|
|
if (!isMobile()) {
|
|
import('./desktop/init')
|
|
.then((d) => d.initDesktop(ijs))
|
|
.catch((e) => console.log(e))
|
|
} else {
|
|
import('./mobile/init').then((m) => m.initMobile(ijs)).catch((e) => console.log(e))
|
|
}
|
|
}
|