Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 28 additions & 3 deletions src/components/StreakTracker.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"use client";

import { useCallback, useEffect, useState } from "react";
import { useAccount } from "@/components/AccountContext";
import { useCountUp } from "@/hooks/useCountUp";
Expand Down Expand Up @@ -373,7 +372,7 @@ export default function StreakTracker() {
: "bg-[var(--control)]"
}`}
>
<div className="text-xl mb-1" title={stat.tooltip} aria-label={stat.tooltip} role="img">{stat.icon}</div>
<div className="text-xl mb-1" title={stat.tooltip} aria-label={stat.tooltip} role="img">{stat.icon}</div>
<div
className={`text-2xl font-bold ${
stat.highlight ? "text-[var(--accent)]" : "text-[var(--accent)]"
Expand All @@ -386,7 +385,33 @@ export default function StreakTracker() {
</span>
)}
</div>
<div className="mt-1 text-xs text-[var(--muted-foreground)]">{stat.label}</div>
<div className="mt-1 flex items-center justify-center gap-1 text-xs text-[var(--muted-foreground)]">
<span>{stat.label}</span>

<button
type="button"
title={stat.tooltip}
aria-label={stat.tooltip}
className="text-[var(--muted-foreground)] hover:text-[var(--accent)] focus:outline-none"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="14"
height="14"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="2"
strokeLinecap="round"
strokeLinejoin="round"
aria-hidden="true"
>
<circle cx="12" cy="12" r="10" />
<line x1="12" y1="16" x2="12" y2="12" />
<line x1="12" y1="8" x2="12.01" y2="8" />
</svg>
</button>
</div>
</div>
))}
</div>
Expand Down
Loading