File size: 1,118 Bytes
a9ff272
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/** 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;