add shared navbar on /account, /chat, /bee

Three-link nav (Chat / Account / Bee) with active-route highlighting,
plus a t4t Gateway home link on the left. Replaces the bespoke header
on the chat page; account and bee gain the same top-of-page nav.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Felix FaerberandClaude Opus 4.7 committed 2026-05-28 09:29:20 +03:00
1 parent 86e0ab356a
commit 83760c4a9b
4 files changed
+64 -18

No files matched your search

+11 -4
View File
@@ -1,4 +1,5 @@
import { useEffect, useState } from 'react';
import { Nav } from '~/components/nav';
const API_URL = import.meta.env.VITE_API_URL ?? 'https://api.t4t-gateway.com';
const WEI_PER_XBZZ = 10n ** 18n;
@@ -168,14 +169,19 @@ export default function Account() {
if (loading) {
return (
<main className='flex min-h-screen items-center justify-center'>
<p className='text-sm text-neutral-600'>Loading…</p>
</main>
<>
<Nav />
<main className='flex min-h-[60vh] items-center justify-center'>
<p className='text-sm text-neutral-600'>Loading…</p>
</main>
</>
);
}
return (
<main className='mx-auto min-h-screen max-w-3xl px-6 py-12'>
<>
<Nav />
<main className='mx-auto max-w-3xl px-6 py-10'>
<div className='flex items-center justify-between'>
<div>
<h1 className='text-2xl font-semibold'>Account</h1>
@@ -394,5 +400,6 @@ export default function Account() {
</div>
)}
</main>
</>
);
}
+11 -4
View File
@@ -1,4 +1,5 @@
import { useEffect, useState } from 'react';
import { Nav } from '~/components/nav';
const API_URL = import.meta.env.VITE_API_URL ?? 'https://api.t4t-gateway.com';
@@ -100,14 +101,19 @@ export default function BeePage() {
if (loading) {
return (
<main className='flex min-h-screen items-center justify-center'>
<p className='text-sm text-neutral-600'>Loading Bee stats…</p>
</main>
<>
<Nav />
<main className='flex min-h-[60vh] items-center justify-center'>
<p className='text-sm text-neutral-600'>Loading Bee stats…</p>
</main>
</>
);
}
return (
<main className='mx-auto min-h-screen max-w-3xl px-6 py-12'>
<>
<Nav />
<main className='mx-auto max-w-3xl px-6 py-10'>
<h1 className='text-2xl font-semibold'>Bee node</h1>
<p className='mt-1 text-sm text-neutral-600'>Read-only status of the operator's Bee node.</p>
@@ -198,5 +204,6 @@ export default function BeePage() {
</Card>
</div>
</main>
</>
);
}
+5 -10
View File
@@ -1,4 +1,5 @@
import { useEffect, useRef, useState } from 'react';
import { Nav } from '~/components/nav';
const API_URL = import.meta.env.VITE_API_URL ?? 'https://api.t4t-gateway.com';
@@ -100,15 +101,9 @@ export default function Chat() {
return (
<main className='flex min-h-screen flex-col'>
<header className='border-b border-neutral-200 bg-white px-6 py-3'>
<div className='mx-auto flex max-w-3xl items-center justify-between'>
<div className='flex items-center gap-3'>
<a href='/account' className='text-sm font-medium text-neutral-700 hover:underline'>
← Account
</a>
<span className='text-neutral-300'>|</span>
<h1 className='text-sm font-semibold'>Chat</h1>
</div>
<Nav />
<div className='border-b border-neutral-200 bg-white px-6 py-2'>
<div className='mx-auto flex max-w-3xl items-center justify-end'>
<select
aria-label='Model'
value={model}
@@ -125,7 +120,7 @@ export default function Chat() {
))}
</select>
</div>
</header>
</div>
<div
ref={scrollRef}