unify single user and multi user behaviour

This commit is contained in:
Davide Scaini
2026-04-09 08:58:35 +02:00
parent 2007f53580
commit 98c42dc443
25 changed files with 678 additions and 232 deletions
+14 -6
View File
@@ -1,9 +1,17 @@
---
import Base from '../../layouts/Base.astro';
import AthleteView from '../../components/AthleteView.svelte';
/**
* Legacy route — redirects to /u/{handle}/athlete/
*/
import { readShardHandles } from '../../lib/manifest';
const base = import.meta.env.BASE_URL;
const shards = readShardHandles();
const handle = shards[0]?.handle ?? null;
---
<Base title="Athlete — BincioActivity">
<h1 class="text-2xl font-bold text-white mb-6">Athlete</h1>
<AthleteView {base} client:load />
</Base>
{handle ? (
<meta http-equiv="refresh" content={`0;url=${base}u/${handle}/athlete/`} />
<script define:vars={{ base, handle }}>
window.location.replace(base + 'u/' + handle + '/athlete/');
</script>
) : (
<p>No data found. Run <code>bincio extract</code> first.</p>
)}