Skip to content

Commit

Permalink
show streak
Browse files Browse the repository at this point in the history
  • Loading branch information
xerosanyam committed Aug 20, 2024
1 parent 235883d commit 95d8cc6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/routes/(protected)/measure/Streak.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
export let data: info = [];
const maxStreakInfo = calculateMaxStreak(data);
const streak = calculateStreak(data, new Date());
// const compounded = `${(Math.pow(1.01, 365) * 100 - 100).toFixed(0)}%`;
</script>

<div class="rounded-sm border p-2 text-center text-gray-500">
<div class="text-lg">
Current Streak: <span class="text-gray-700">{calculateStreak(data, new Date())}</span>
Current Streak: <span class="cursor-default text-gray-700">{streak}</span>
</div>
{#if maxStreakInfo.maxStreak > 0}
<div class="text-xs">
Expand Down

0 comments on commit 95d8cc6

Please sign in to comment.