feat(nav): add header navigation and show Steam ID on dashboard

Header links to Dashboard, Library and Settings. The logo, the login page and
the landing page lead logged-in users to the dashboard. Expired tokens are
removed, and a 403 on the dashboard logs out. Remove the dev dummy token.
This commit is contained in:
lobo committed 2026-09-24 08:57:03 +02:00
1 parent 44e23de6d6
commit 8fa605aff0
8 files changed
+124 -23

No files matched your search

+10 -3
View File
@@ -1,5 +1,6 @@
import {useTranslation} from 'react-i18next';
import {Link} from 'react-router-dom';
import {getValidToken} from '../utils/auth.js';
import StatCard from '../components/StatCard.jsx';
import usePublicStats from '../hooks/usePublicStats.js';
@@ -25,9 +26,15 @@ export default function LandingPage() {
<p className="text-lg text-slate-600 dark:text-slate-400 max-w-2xl mx-auto mb-8">
{t('MAIN.DESCRIPTION')}
</p>
<Link to="/login" className="bg-blue-600 hover:bg-blue-500 text-white px-8 py-3 rounded-xl font-bold text-lg transition-all shadow-lg shadow-blue-500/30">
{t('MAIN.GET_STARTED')}
</Link>
{getValidToken() ? (
<Link to="/dashboard" className="bg-blue-600 hover:bg-blue-500 text-white px-8 py-3 rounded-xl font-bold text-lg transition-all shadow-lg shadow-blue-500/30">
{t('NAV.TO_DASHBOARD')}
</Link>
) : (
<Link to="/login" className="bg-blue-600 hover:bg-blue-500 text-white px-8 py-3 rounded-xl font-bold text-lg transition-all shadow-lg shadow-blue-500/30">
{t('MAIN.GET_STARTED')}
</Link>
)}
</section>
<section className="w-full max-w-5xl mb-16">