diff --git a/src/lib/sections/stats/MiscSection.svelte b/src/lib/sections/stats/MiscSection.svelte index 70fe34170..76d74a9ee 100644 --- a/src/lib/sections/stats/MiscSection.svelte +++ b/src/lib/sections/stats/MiscSection.svelte @@ -23,6 +23,7 @@

Miscellaneous

+{console.log(profile.misc)} diff --git a/src/lib/sections/stats/misc/auctions.svelte b/src/lib/sections/stats/misc/auctions.svelte index aa2d040a4..624f852dc 100644 --- a/src/lib/sections/stats/misc/auctions.svelte +++ b/src/lib/sections/stats/misc/auctions.svelte @@ -8,32 +8,34 @@ const misc = getContext("misc"); - -
- - - - {#each Object.entries(misc.auctions.total_sold) as [rarity, amount]} - {#if rarity !== "total"} - - {/if} - {/each} - -
-
+{#if misc.auctions != null} + +
+ + + + {#each Object.entries(misc.auctions.total_sold) as [rarity, amount]} + {#if rarity !== "total"} + + {/if} + {/each} + +
+
- -
- - - - - - {#each Object.entries(misc.auctions.total_bought) as [rarity, amount]} - {#if rarity !== "total"} - - {/if} - {/each} - -
-
+ +
+ + + + + + {#each Object.entries(misc.auctions.total_bought) as [rarity, amount]} + {#if rarity !== "total"} + + {/if} + {/each} + +
+
+{/if} diff --git a/src/lib/sections/stats/misc/claimed.svelte b/src/lib/sections/stats/misc/claimed.svelte index 564914fd9..e4c72c99c 100644 --- a/src/lib/sections/stats/misc/claimed.svelte +++ b/src/lib/sections/stats/misc/claimed.svelte @@ -8,17 +8,19 @@ const misc = getContext("misc"); - -
- {#each Object.entries(misc.claimed_items) as [item, time]} - - {formatDate(time, "'Claimed on' dd MMMM yyyy 'at' HH:mm")} - - {/each} -
-
+{#if misc.claimed_items != null} + +
+ {#each Object.entries(misc.claimed_items) as [item, time]} + + {formatDate(time, "'Claimed on' dd MMMM yyyy 'at' HH:mm")} + + {/each} +
+
+{/if} diff --git a/src/lib/sections/stats/misc/damage.svelte b/src/lib/sections/stats/misc/damage.svelte index 673f1cea2..c35099994 100644 --- a/src/lib/sections/stats/misc/damage.svelte +++ b/src/lib/sections/stats/misc/damage.svelte @@ -8,10 +8,12 @@ const misc = getContext("misc"); - -
- {#each Object.entries(misc.damage) as [text, data]} - - {/each} -
-
+{#if misc.damage != null} + +
+ {#each Object.entries(misc.damage) as [text, data]} + + {/each} +
+
+{/if} diff --git a/src/lib/sections/stats/misc/dragons.svelte b/src/lib/sections/stats/misc/dragons.svelte index 4880149ec..8180d731a 100644 --- a/src/lib/sections/stats/misc/dragons.svelte +++ b/src/lib/sections/stats/misc/dragons.svelte @@ -8,35 +8,37 @@ const misc = getContext("misc"); - -
- - {#each Object.entries(misc.dragons.most_damage) as [text, data]} - {#if text !== "best"} - - {/if} - {/each} - - - {#each Object.entries(misc.dragons.fastest_kill) as [text, data]} - {#if text !== "best"} - - {/if} - {/each} - - - {#each Object.entries(misc.dragons.last_hits) as [text, data]} - {#if text !== "total"} - - {/if} - {/each} - - - {#each Object.entries(misc.dragons.deaths) as [text, data]} - {#if text !== "total"} - - {/if} - {/each} - -
-
+{#if misc.dragons != null} + +
+ + {#each Object.entries(misc.dragons.most_damage) as [text, data]} + {#if text !== "best"} + + {/if} + {/each} + + + {#each Object.entries(misc.dragons.fastest_kill) as [text, data]} + {#if text !== "best"} + + {/if} + {/each} + + + {#each Object.entries(misc.dragons.last_hits) as [text, data]} + {#if text !== "total"} + + {/if} + {/each} + + + {#each Object.entries(misc.dragons.deaths) as [text, data]} + {#if text !== "total"} + + {/if} + {/each} + +
+
+{/if} diff --git a/src/lib/sections/stats/misc/endstone.svelte b/src/lib/sections/stats/misc/endstone.svelte index 32eadd633..f919664f7 100644 --- a/src/lib/sections/stats/misc/endstone.svelte +++ b/src/lib/sections/stats/misc/endstone.svelte @@ -8,10 +8,12 @@ const misc = getContext("misc"); - -
- {#each Object.entries(misc.endstone_protector) as [text, data]} - - {/each} -
-
+{#if misc.endstone_protector != null} + +
+ {#each Object.entries(misc.endstone_protector) as [text, data]} + + {/each} +
+
+{/if} diff --git a/src/lib/sections/stats/misc/essence.svelte b/src/lib/sections/stats/misc/essence.svelte index 697424267..8eccebd83 100644 --- a/src/lib/sections/stats/misc/essence.svelte +++ b/src/lib/sections/stats/misc/essence.svelte @@ -8,22 +8,24 @@ const misc = getContext("misc"); -
-

Essence

-
- {#each misc.essence as essence} - {@const hasUnlocked = essence.amount} - -
-
- {essence.name} -
- Amount: - {format(essence.amount)} +{#if misc.essence != null} +
+

Essence

+
+ {#each misc.essence as essence} + {@const hasUnlocked = essence.amount} + +
+
+ {essence.name} +
+ Amount: + {format(essence.amount)} +
-
- - {/each} + + {/each} +
-
+{/if} diff --git a/src/lib/sections/stats/misc/gifts.svelte b/src/lib/sections/stats/misc/gifts.svelte index f0f486dee..9b75ead4c 100644 --- a/src/lib/sections/stats/misc/gifts.svelte +++ b/src/lib/sections/stats/misc/gifts.svelte @@ -8,10 +8,12 @@ const misc = getContext("misc"); - -
- {#each Object.entries(misc.gifts) as [text, data]} - - {/each} -
-
+{#if misc.gifts != null} + +
+ {#each Object.entries(misc.gifts) as [text, data]} + + {/each} +
+
+{/if} diff --git a/src/lib/sections/stats/misc/jerry.svelte b/src/lib/sections/stats/misc/jerry.svelte index 06c2d32ef..52799a112 100644 --- a/src/lib/sections/stats/misc/jerry.svelte +++ b/src/lib/sections/stats/misc/jerry.svelte @@ -8,10 +8,12 @@ const misc = getContext("misc"); - -
- {#each Object.entries(misc.season_of_jerry) as [text, data]} - - {/each} -
-
+{#if misc.season_of_jerry != null} + +
+ {#each Object.entries(misc.season_of_jerry) as [text, data]} + + {/each} +
+
+{/if} diff --git a/src/lib/sections/stats/misc/kills.svelte b/src/lib/sections/stats/misc/kills.svelte index a7a7c1f7c..dde0bc177 100644 --- a/src/lib/sections/stats/misc/kills.svelte +++ b/src/lib/sections/stats/misc/kills.svelte @@ -8,32 +8,34 @@ const misc = getContext("misc"); -
-

Kills

-
- - -
-
-
-
Kills
- 0 ? 20 : 0} scrollDirection="vertical"> -
-
#{index + 1}
-
{misc.kills.kills[index].name}
-
: {format(misc.kills.kills[index].amount)}
-
-
+{#if misc.kills != null} +
+

Kills

+
+ +
-
-
Deaths
- 0 ? 20 : 0} scrollDirection="vertical"> -
-
#{index + 1}
-
{misc.kills.deaths[index].name}
-
: {format(misc.kills.deaths[index].amount)}
-
-
+
+
+
Kills
+ 0 ? 20 : 0} scrollDirection="vertical"> +
+
#{index + 1}
+
{misc.kills.kills[index].name}
+
: {format(misc.kills.kills[index].amount)}
+
+
+
+
+
Deaths
+ 0 ? 20 : 0} scrollDirection="vertical"> +
+
#{index + 1}
+
{misc.kills.deaths[index].name}
+
: {format(misc.kills.deaths[index].amount)}
+
+
+
-
+{/if} diff --git a/src/lib/sections/stats/misc/mythological.svelte b/src/lib/sections/stats/misc/mythological.svelte index a8af49988..dd40576f3 100644 --- a/src/lib/sections/stats/misc/mythological.svelte +++ b/src/lib/sections/stats/misc/mythological.svelte @@ -8,44 +8,46 @@ const misc = getContext("misc"); - -
- +{#if misc.mythological_event != null} + +
+ - -

Rarities used:

- {#each Object.entries(misc.mythological_event.burrows_dug_next) as [tier, count]} - {#if tier !== "total"} - - {/if} - {/each} - + +

Rarities used:

+ {#each Object.entries(misc.mythological_event.burrows_dug_next) as [tier, count]} + {#if tier !== "total"} + + {/if} + {/each} + - -

Rarities used:

- {#each Object.entries(misc.mythological_event.burrows_dug_combat) as [tier, count]} - {#if tier !== "total"} - - {/if} - {/each} - + +

Rarities used:

+ {#each Object.entries(misc.mythological_event.burrows_dug_combat) as [tier, count]} + {#if tier !== "total"} + + {/if} + {/each} + - -

Rarities used:

- {#each Object.entries(misc.mythological_event.burrows_dug_treasure) as [tier, count]} - {#if tier !== "total"} - - {/if} - {/each} - + +

Rarities used:

+ {#each Object.entries(misc.mythological_event.burrows_dug_treasure) as [tier, count]} + {#if tier !== "total"} + + {/if} + {/each} + - -

Rarities used:

- {#each Object.entries(misc.mythological_event.burrows_chains_complete) as [tier, count]} - {#if tier !== "total"} - - {/if} - {/each} - -
-
+ +

Rarities used:

+ {#each Object.entries(misc.mythological_event.burrows_chains_complete) as [tier, count]} + {#if tier !== "total"} + + {/if} + {/each} + +
+
+{/if} diff --git a/src/lib/sections/stats/misc/pet.svelte b/src/lib/sections/stats/misc/pet.svelte index 9749b280b..d193b8b12 100644 --- a/src/lib/sections/stats/misc/pet.svelte +++ b/src/lib/sections/stats/misc/pet.svelte @@ -8,18 +8,20 @@ const misc = getContext("misc"); - -
- - +{#if misc.pet_milestones != null} + +
+ + - - + + - - + + - - -
-
+ + +
+
+{/if} diff --git a/src/lib/sections/stats/misc/potions.svelte b/src/lib/sections/stats/misc/potions.svelte index fb0421344..ed6b0ab34 100644 --- a/src/lib/sections/stats/misc/potions.svelte +++ b/src/lib/sections/stats/misc/potions.svelte @@ -8,13 +8,15 @@ const misc = getContext("misc"); - -
- -

Disabled Potion Effects:

- {#each misc.effects.disabled as effect} -

{effect.replaceAll("_", " ")}

- {/each} -
-
-
+{#if misc.effects != null} + +
+ +

Disabled Potion Effects:

+ {#each misc.effects.disabled as effect} +

{effect.replaceAll("_", " ")}

+ {/each} +
+
+
+{/if} diff --git a/src/lib/sections/stats/misc/races.svelte b/src/lib/sections/stats/misc/races.svelte index e2b0b1288..1efaa7e17 100644 --- a/src/lib/sections/stats/misc/races.svelte +++ b/src/lib/sections/stats/misc/races.svelte @@ -7,46 +7,48 @@ const misc = getContext("misc"); -
-

Races

-
- {#each Object.entries(misc.races) as [_, race]} -
-
{race.name}
-
- {#if race.races.with_return} -

With Return:

-
-
- {#each Object.entries(race.races.with_return) as [_, value]} - - {/each} +{#if misc.races != null} +
+

Races

+
+ {#each Object.entries(misc.races) as [_, race]} +
+
{race.name}
+
+ {#if race.races.with_return} +

With Return:

+
+
+ {#each Object.entries(race.races.with_return) as [_, value]} + + {/each} +
-
- {/if} + {/if} - {#if race.races.no_return} -

No Return:

-
+ {#if race.races.no_return} +

No Return:

+
+
+ {#each Object.entries(race.races.no_return) as [_, value]} + + {/each} +
+
+ {/if} + + {#if race.name === "Other"}
- {#each Object.entries(race.races.no_return) as [_, value]} - + {#each Object.entries(race.races) as [_, value]} + {#if value && "name" in value} + + {/if} {/each}
-
- {/if} - - {#if race.name === "Other"} -
- {#each Object.entries(race.races) as [_, value]} - {#if value && "name" in value} - - {/if} - {/each} -
- {/if} + {/if} +
-
- {/each} + {/each} +
-
+{/if} diff --git a/src/lib/sections/stats/misc/uncategorized.svelte b/src/lib/sections/stats/misc/uncategorized.svelte index c28ed1ca8..1a2bbfd6e 100644 --- a/src/lib/sections/stats/misc/uncategorized.svelte +++ b/src/lib/sections/stats/misc/uncategorized.svelte @@ -8,22 +8,24 @@ const misc = getContext("misc"); - -
- {#if misc.uncategorized.soulflow} - - {/if} +{#if misc.uncategorized != null} + +
+ {#if misc.uncategorized.soulflow} + + {/if} - {#if misc.uncategorized.teleporter_pill_consumed} - - {/if} + {#if misc.uncategorized.teleporter_pill_consumed} + + {/if} - {#if misc.uncategorized.reaper_peppers_eaten} - - {/if} + {#if misc.uncategorized.reaper_peppers_eaten} + + {/if} - {#if misc.uncategorized.personal_bank !== "Unknown"} - - {/if} -
-
+ {#if misc.uncategorized.personal_bank !== "Unknown"} + + {/if} +
+
+{/if} diff --git a/src/lib/sections/stats/misc/upgrades.svelte b/src/lib/sections/stats/misc/upgrades.svelte index 4ad877b12..26b1f2481 100644 --- a/src/lib/sections/stats/misc/upgrades.svelte +++ b/src/lib/sections/stats/misc/upgrades.svelte @@ -8,12 +8,14 @@ const misc = getContext("misc"); - -
- - - - - -
-
+{#if misc.profile_upgrades != null} + +
+ + + + + +
+
+{/if}