import { page } from '$app/state'; /** * The name this instance answers to, set by the admin. The root layout puts it in * every page's data, and the wordmark and every browser tab read it here, so a * rename lands in one place. A layout that failed to load leaves no instance, so * the product name is the fallback rather than an empty tab. */ export function instanceName(): string { const name = (page.data as { instance?: { name?: string } }).instance?.name?.trim(); return name ? name : 'Fablewright'; }