We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f3e43d commit 0f83441Copy full SHA for 0f83441
src/lib/index/sections/workouts/stats.svelte
@@ -3,12 +3,13 @@
3
import Stats from '$lib/stats.svelte';
4
import { renderDuration } from '$lib/time';
5
import { onMount } from 'svelte';
6
+ import { SvelteMap } from 'svelte/reactivity';
7
8
const { workout }: { workout: Workout } = $props();
9
10
let imperialUnits = $state(false);
11
let stats = $derived(
- new Map<string, string>([['Duration', renderDuration(workout.moving_time)]])
12
+ new SvelteMap<string, string>([['Duration', renderDuration(workout.moving_time)]])
13
);
14
15
onMount(() => {
@@ -72,7 +73,7 @@
72
73
stats.set('Sets', `${workout.hevy_set_count ?? 0}`);
74
}
75
- stats = new Map(stats);
76
+ stats = new SvelteMap(stats);
77
});
78
</script>
79
0 commit comments