Skip to content

Commit

Permalink
Reduce data size on /Items and /Items/All
Browse files Browse the repository at this point in the history
/Items: 371 kB -> 141 kB
/Items/All: 601 kB -> 230 kB
  • Loading branch information
MatthiasKunnen committed Jan 14, 2024
1 parent f1e3625 commit 57b18c1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/routes/Items/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ export const load = async () => {
return {
items: Object.entries(data.items)
.filter(([_, item]) => item.recipes.length > 0)
.map(([itemId, item]) => [
itemId,
{
displayName: item.displayName,
icon: item.icon,
},
] as const)
.sort(([, a], [, b]) => {
return a.displayName.localeCompare(b.displayName);
}),
Expand Down

0 comments on commit 57b18c1

Please sign in to comment.