Skip to content

Commit

Permalink
ref(frontend): Parallelize initial API requests
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric committed Aug 25, 2023
1 parent abc3a92 commit e1c4ddb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions frontend/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ import './assets/main.css'

api.init()

await store.dispatch('getLeaderboard')
await store.dispatch('getUser')
await store.dispatch('getUsers')
await store.dispatch('getProducts')
await store.dispatch('getCollection')
await Promise.all([
store.dispatch('getLeaderboard'),
store.dispatch('getUser'),
store.dispatch('getUsers'),
store.dispatch('getProducts'),
store.dispatch('getCollection'),
])

app
.use(router)
Expand Down

0 comments on commit e1c4ddb

Please sign in to comment.