Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/frontend/packages/swarm-ui/src/pages/StartPage.tsx
iris 417125b33c swarm-ui: a start page at / and the hive directory at /hives
/ is now the swarm's name over the digital-rain backdrop the hive
dashboard's home has, and the swarm name in the header links to it. The
hive directory moves to /hives, where the nav's hives tab points. The
swarm name is read once per page load by a shared hook, the header and
the start page both use it. Closes #5252
2026-10-14 18:36:52 +02:00

20 lines
694 B
TypeScript

// <StartPage> — `/`, the swarm's landing page: the swarm's name over the
// digital-rain backdrop, and nothing else. The header's swarm name links
// here. The hive roster that used to be `/` is now `/hives`.
import { MatrixRain } from "../shell/MatrixRain.js";
import { useSwarmName } from "../shell/useSwarmName.js";
import "./StartPage.css";
// Same fallback as the header and the page title, so an unnamed swarm shows
// one label everywhere.
const DEFAULT_NAME = "hyperhive swarm";
export function StartPage() {
const name = useSwarmName() ?? DEFAULT_NAME;
return (
<div class="start-page">
<MatrixRain />
<h1 class="start-page-name">{name}</h1>
</div>
);
}