Skip to content

Commit

Permalink
fix(stats/enchanting): types
Browse files Browse the repository at this point in the history
  • Loading branch information
DuckySoLucky committed Jun 28, 2024
1 parent 16013bc commit cfbab81
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
14 changes: 7 additions & 7 deletions src/lib/constants/enchanting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@ export const EXPERIMENTS = {
tiers: [
{
name: "Beginner",
icon: "/api/item/INK_SACK:12"
texture: "/api/item/INK_SACK:12"
},
{
name: "High",
icon: "/api/item/INK_SACK:10"
texture: "/api/item/INK_SACK:10"
},
{
name: "Grand",
icon: "/api/item/INK_SACK:11"
texture: "/api/item/INK_SACK:11"
},
{
name: "Supreme",
icon: "/api/item/INK_SACK:14"
texture: "/api/item/INK_SACK:14"
},
{
name: "Transcendent",
icon: "/api/item/INK_SACK:1"
texture: "/api/item/INK_SACK:1"
},
{
name: "Metaphysical",
icon: "/api/item/INK_SACK:13"
texture: "/api/item/INK_SACK:13"
}
]
} as Record<string, Record<string, { name: string }> | { name: string; icon: string }[]>;
} as Record<string, Record<string, { name: string }> | { name: string; texture: string }[]>;
12 changes: 6 additions & 6 deletions src/lib/sections/stats/skills/enchanting.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</div>
<div class="w-full px-5">
{#if enchating.stats.bonusClicks}
<AdditionStat text="Bonus Clicks" data={enchating.stats.bonusClicks} />
<AdditionStat text="Bonus Clicks" data={`${enchating.stats.bonusClicks}`} />
{/if}
{#if enchating.stats.lastAttempt}
<AdditionStat text="Last Attempt" data={formatDistanceStrict(enchating.stats.lastAttempt, Date.now(), { addSuffix: true })} />
Expand All @@ -38,20 +38,20 @@
</div>
<div class="w-full space-y-5 px-5 pb-5">
{#each enchating.stats.games as game}
<Chip image={{ src: game.icon }} class="w-full max-w-none">
<Chip image={{ src: game.texture }} class="w-full max-w-none">
<div class="flex flex-col">
<div class="flex flex-col gap-0.5">
<h4 class="font-bold text-text/60">{game.name}</h4>
<h4 class="font-bold text-text/60">{`${game.name}`}</h4>
</div>
<div class="flex w-full flex-col gap-0.5">
{#if game.attempts}
<AdditionStat text="Attempts" data={game.attempts} />
<AdditionStat text="Attempts" data={`${game.attempts}`} />
{/if}
{#if game.claims}
<AdditionStat text="Claims" data={game.claims} />
<AdditionStat text="Claims" data={`${game.claims}`} />
{/if}
{#if game.bestScore}
<AdditionStat text="Best Score" data={game.bestScore} />
<AdditionStat text="Best Score" data={`${game.bestScore}`} />
{/if}
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions src/types/stats.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { AccessoriesOutput, DungeonsStats, Farming, Fishing, Items, MainSta
import type { BestiaryStats } from "./processed/profile/bestiary";
import type { Collections } from "./processed/profile/collections";
import type { CrimsonIsle } from "./processed/profile/crimson_isle";
import type { Enchanting } from "./processed/profile/enchanting";
import type { Minions } from "./processed/profile/minions";
export * from "./processed/profile/collections";
export * from "./processed/profile/crimson_isle";
Expand Down

0 comments on commit cfbab81

Please sign in to comment.