runloopable / web /src /home /ModuleHomeHead.tsx
fsanyoto's picture
Deploy AIOS web (React glide grid + FastAPI slice)
816fa8a verified
Raw History Blame Contribute Delete
1.12 kB
/** The one subtitle per module home, keyed by route key: a few plain words, no full stop, no dash. */
export const MODULE_SUBTITLES = {
intelligence: "What your workspace knows",
data: "Every database in one place",
sheet: "Workbooks on live data",
app: "Apps built on your data",
automation: "Work that runs for you",
artifacts: "What the assistant made",
assistant: "Ask about your data",
connectors: "Connect your tools and data",
} as const;
export type ModuleSubtitleKey = keyof typeof MODULE_SUBTITLES;
/** The module home title row: one h1 and the module's subtitle from MODULE_SUBTITLES. */
export function ModuleHomeHead({ title, module, className }: {
title: string; module?: ModuleSubtitleKey; className?: string;
}) {
const subtitle = module ? MODULE_SUBTITLES[module] : undefined;
return <div className={className ? "home-page-head " + className : "home-page-head"}>
<div className="home-page-head-text">
<h1 className="home-title">{title}</h1>
{subtitle ? <p className="home-subtitle">{subtitle}</p> : null}
</div>
</div>;
}
export default ModuleHomeHead;