// The persistent top bar: the app wordmark + the dev identity control. "Who you are" is a handle // persisted per browser; "Switch user" rewrites it. A real app would show the signed-in account from // a verified token instead (see shared/auth.ts). import { Link } from "@tanstack/react-router"; import { useCurrentHandle } from "../lib/use-handle.ts"; import { currentHandle, setCurrentHandle } from "../rindle-client.ts"; export function TopBar() { const me = useCurrentHandle(); function switchUser() { const next = prompt("Switch dev user (handle):", currentHandle()); if (next && next.trim()) { setCurrentHandle(next.trim()); location.reload(); } } return (
rindlestarter
signed in as {me}
); }