Add streak helpers to Dashboard

cgen-a3e020f8a0e7483b8b163116103e50b8
This commit is contained in:
Builder.io 2025-10-04 10:40:33 +00:00
parent d9903c14cd
commit 8a3a4a94d7

View file

@ -98,6 +98,10 @@ export default function Dashboard() {
() => searchParams.get("tab") ?? "profile",
);
const currentStreak = profile?.current_streak ?? 0;
const longestStreak = profile?.longest_streak ?? currentStreak;
const streakLabel = `${currentStreak} day${currentStreak === 1 ? "" : "s"} streak`;
const linkedProviderMap = useMemo(() => {
const map: Record<string, (typeof linkedProviders)[number]> = {};
linkedProviders.forEach((lp) => {