| 1 | import Link from "next/link"; |
| 2 | import { ACCOUNT_ENTRY_COPY } from "@/lib/content/account-entry"; |
| 3 | import { pickText } from "@/lib/i18n/dictionaries"; |
| 4 | import { publicAuthAppDestination } from "@/lib/public-auth-routes"; |
| 5 | import { WhalePose } from "./whale-pose"; |
| 6 | |
| 7 | /** |
| 8 | * The public sign-in door. codewhale.net is not the signed-in app: one |
| 9 | * primary action sends the reader to it and one secondary action installs |
| 10 | * locally (no account needed). The whale listens. |
| 11 | */ |
| 12 | export function PublicAccountEntry({ |
| 13 | locale, |
| 14 | }: { |
| 15 | locale: string; |
| 16 | }) { |
| 17 | const copy = ACCOUNT_ENTRY_COPY.signIn; |
| 18 | const appHref = publicAuthAppDestination(locale); |
| 19 | |
| 20 | return ( |
| 21 | <div className="account-entry"> |
| 22 | <WhalePose pose="listen" className="account-entry-pose" priority /> |
| 23 | <h1 className="page-title">{pickText(copy.title, locale)}</h1> |
| 24 | <p className="page-lede">{pickText(ACCOUNT_ENTRY_COPY.lede, locale)}</p> |
| 25 | <div className="actions"> |
| 26 | <a className="btn btn-primary btn-lg" href={appHref} data-usage="login"> |
| 27 | {pickText(copy.action, locale)} |
| 28 | </a> |
| 29 | <Link className="btn btn-secondary btn-lg" href={`/${locale}/install`}> |
| 30 | {pickText(ACCOUNT_ENTRY_COPY.installLocally, locale)} |
| 31 | </Link> |
| 32 | </div> |
| 33 | </div> |
| 34 | ); |
| 35 | } |
| 36 |