---
/**
 * Legacy route — redirects to /u/{handle}/stats/
 * In multi-user mode the user-widget script in the nav handles the correct link.
 */
import { readShardHandles } from '../../lib/manifest';
const base = import.meta.env.BASE_URL;
const shards = readShardHandles();
const handle = shards[0]?.handle ?? null;
---
{handle ? (
  <meta http-equiv="refresh" content={`0;url=${base}u/${handle}/stats/`} />
  <script define:vars={{ base, handle }}>
    window.location.replace(base + 'u/' + handle + '/stats/');
  </script>
) : (
  <p>No data found. Upload activities to get started.</p>
)}
