Skip to content

Commit b1ebb40

Browse files
committed
Rearrange init code
1 parent e7d8430 commit b1ebb40

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/web/index.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
1+
import './init'
12
import { h, render } from 'preact'
23
import { UI } from '~/ui'
34
import { RouterContext, useRouter } from '~/ui/router'
4-
import firebase from 'firebase/app'
5-
import { CONFIG, SENTRY_URL } from '~/constants'
6-
import { initSentry } from '~/utils/sentry'
7-
8-
firebase.initializeApp(CONFIG.firebaseApp)
9-
initSentry(SENTRY_URL)
105

116
const ClientUI = () => {
127
const router = useRouter(location.href)

src/web/init.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { initializeApp } from 'firebase/app'
2+
import { CONFIG, SENTRY_URL } from '~/constants'
3+
import { initSentry } from '~/utils/sentry'
4+
5+
initializeApp(CONFIG.firebaseApp)
6+
initSentry(SENTRY_URL)

0 commit comments

Comments
 (0)