/ 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
20 lines
694 B
TypeScript
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>
|
|
);
|
|
}
|