Skip to content

Commit

Permalink
Update main
Browse files Browse the repository at this point in the history
  • Loading branch information
José Luis Pereira committed Sep 20, 2022
1 parent baf36ed commit dfb21d1
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,22 @@ import globalComponents from '@/components/globalComponents'
import.meta.globEager('@/assets/css/main.css')
import.meta.globEager('../config/style/*.{scss,css}')

const isAPIConfigurationSet = __APP_ENV__.url && __APP_ENV__.project_token
let app
function initTaxonPagesApp () {
const isAPIConfigurationSet = __APP_ENV__.url && __APP_ENV__.project_token
const app = createApp(
isAPIConfigurationSet
? App
: SetupApp
)

if (isAPIConfigurationSet) {
app = createApp(App)
app.use(router)
globalComponents.register(app)
} else {
app = createApp(SetupApp)
if (isAPIConfigurationSet) {
app.use(router)
globalComponents.register(app)
}

return app
}

const app = initTaxonPagesApp()

app.mount('#app')

0 comments on commit dfb21d1

Please sign in to comment.