| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
| const STORAGE_KEY = 'medos_variant'; |
|
|
| export function pickVariant(n: number): number { |
| if (n <= 1) return 0; |
| if (typeof window === 'undefined') return 0; |
| try { |
| const existing = localStorage.getItem(STORAGE_KEY); |
| if (existing !== null) { |
| const parsed = parseInt(existing, 10); |
| if (!Number.isNaN(parsed) && parsed >= 0 && parsed < n) return parsed; |
| } |
| const v = Math.floor(Math.random() * n); |
| localStorage.setItem(STORAGE_KEY, String(v)); |
| return v; |
| } catch { |
| return Math.floor(Date.now() / 1000) % n; |
| } |
| } |
|
|
| |
| |
| |
| |
| |
| export const HERO_VARIANTS = [ |
| { |
| title: "Tell me what's bothering you.", |
| subtitle: |
| "I'll help you understand it — calmly, clearly, and privately. Aligned with WHO · CDC · NHS guidelines.", |
| eyebrow: 'Your worldwide medical companion', |
| }, |
| { |
| title: 'Describe how you feel.', |
| subtitle: |
| 'Get clear, trustworthy health guidance in your own language — instantly, for free, with no sign-up.', |
| eyebrow: 'Trusted health answers, 24/7', |
| }, |
| { |
| title: 'Ask any health question.', |
| subtitle: |
| 'Private, multilingual medical guidance aligned with WHO and CDC. No account, no paywall, no data stored.', |
| eyebrow: 'Free forever · 20 languages', |
| }, |
| ] as const; |
|
|