Skip to content

Commit

Permalink
スタンプを並列取得 (#719)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red authored Oct 5, 2022
1 parent 5b57b36 commit 8118f52
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ const fetchAndSetChannels = async (): Promise<void> => {
}

const fetchAndSetStamps = async (): Promise<void> => {
const stamps = (await apis.getStamps()).data
const [originalRes, unicodeRes] = await Promise.all([
apis.getStamps(undefined, 'original'),
apis.getStamps(undefined, 'unicode')
])
const stamps = [...originalRes.data, ...unicodeRes.data]
const stampNameMap = new Map(stamps.map(s => [s.name, s]))
await set('stampNameMap', stampNameMap, store)
}
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"lib": ["es2018", "dom"],
"types": ["vite/client"],
"rootDir": "./src",
"importHelpers": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
Expand Down

0 comments on commit 8118f52

Please sign in to comment.