mirror of
https://github.com/layer-systems/website.git
synced 2026-09-13 06:07:29 +02:00
* new web os frontend * add docs * Add CNAME and restore NIP-05 nostr.json for GitHub Pages The Pages custom domain (layer.systems) is only stored in repo settings; a CNAME file in the build output makes it survive Pages reconfiguration. Restore public/.well-known/nostr.json, which this branch had dropped — removing it would break the existing NIP-05 identifiers on layer.systems. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YtQoCzkP7Bo8nruhxojPi * Ignore eslint and tsc build caches Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YtQoCzkP7Bo8nruhxojPi * Rebrand page title and metadata to LAYER.systems The site ships on layer.systems, so the document title, meta and OG description, and the web manifest now carry that name instead of "Nostr OS". OsShell sets the title at runtime, so it is updated too — otherwise the tab would fall back to the old branding after hydration. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YtQoCzkP7Bo8nruhxojPi * Rename remaining visible "Nostr OS" strings to LAYER.systems Covers the About window heading, the mobile shell header and the app icon's aria-label, so the visible branding matches the page title. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014YtQoCzkP7Bo8nruhxojPi --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
23 lines
641 B
TypeScript
23 lines
641 B
TypeScript
import { useMemo } from 'react';
|
|
import { useAppContext } from '@/hooks/useAppContext';
|
|
|
|
/** How many hints to embed. NIP-19 identifiers get unwieldy beyond a couple. */
|
|
const MAX_HINTS = 2;
|
|
|
|
/**
|
|
* Relays worth embedding in a NIP-19 identifier we hand out: the ones we read
|
|
* from, which are also the ones most likely to hold what we are pointing at.
|
|
*/
|
|
export function useRelayHints(): string[] {
|
|
const { config } = useAppContext();
|
|
|
|
return useMemo(
|
|
() =>
|
|
config.relayMetadata.relays
|
|
.filter((relay) => relay.read)
|
|
.slice(0, MAX_HINTS)
|
|
.map((relay) => relay.url),
|
|
[config.relayMetadata],
|
|
);
|
|
}
|