Fix NerdCorner: pass all activities, not only those with power data

This commit is contained in:
Davide Scaini
2026-05-14 16:39:57 +02:00
parent 8804bdec37
commit b32553b0b1
+5 -3
View File
@@ -18,7 +18,8 @@
export let handle: string = ''; export let handle: string = '';
let athlete: AthleteJson | null = null; let athlete: AthleteJson | null = null;
let activities: ActivitySummary[] = []; let activities: ActivitySummary[] = [];
let allActivities: ActivitySummary[] = [];
let loading = true; let loading = true;
let error: string | null = null; let error: string | null = null;
let drawerOpen = false; let drawerOpen = false;
@@ -119,7 +120,8 @@
} catch { /* ignore */ } } catch { /* ignore */ }
} }
athlete = resolvedAthlete; athlete = resolvedAthlete;
activities = index.activities.filter(a => a.mmp && !isUnlisted(a.privacy)); allActivities = index.activities.filter(a => !isUnlisted(a.privacy));
activities = allActivities.filter(a => a.mmp);
} catch (e: any) { } catch (e: any) {
error = e.message; error = e.message;
} finally { } finally {
@@ -337,7 +339,7 @@
{:else if activeTab === 'nerd'} {:else if activeTab === 'nerd'}
<div class="bg-zinc-900 rounded-xl p-4 border border-zinc-800"> <div class="bg-zinc-900 rounded-xl p-4 border border-zinc-800">
<h3 class="text-sm font-medium text-zinc-400 uppercase tracking-wide mb-4">Year over year</h3> <h3 class="text-sm font-medium text-zinc-400 uppercase tracking-wide mb-4">Year over year</h3>
<NerdCorner {activities} /> <NerdCorner activities={allActivities} />
</div> </div>
<!-- Explore tab --> <!-- Explore tab -->