Add streak helpers to Dashboard
cgen-a3e020f8a0e7483b8b163116103e50b8
This commit is contained in:
parent
d9903c14cd
commit
8a3a4a94d7
1 changed files with 4 additions and 0 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue