import { Dialog, DialogBackdrop, DialogPanel, DialogTitle } from '@headlessui/react' import { IconAlertTriangle } from '@tabler/icons-react' import StyledButton from '~/components/StyledButton' /** * localStorage key for the Drug Reference disclaimer acknowledgement. Versioned: * bump the suffix if the disclaimer text changes materially so every browser is * re-prompted. Per-browser by design — a new browser/device gets the gate again. */ export const DRUG_DISCLAIMER_ACK_KEY = 'nomad:drugReferenceDisclaimer:v1' export function hasAcknowledgedDrugDisclaimer(): boolean { if (typeof window === 'undefined') return true try { return window.localStorage.getItem(DRUG_DISCLAIMER_ACK_KEY) === 'ack' } catch { return false } } /** * First-open disclaimer gate for the Drug Reference. Blocks the page until the * user acknowledges (no backdrop / Escape dismissal). On acknowledgement the * acceptance is saved to this browser's localStorage so it isn't shown again on * this browser — other browsers/devices see it on their first open. */ export default function DrugDisclaimerModal({ open, onAcknowledge }: { open: boolean; onAcknowledge: () => void }) { const acknowledge = () => { try { window.localStorage.setItem(DRUG_DISCLAIMER_ACK_KEY, 'ack') } catch { // Private mode / storage disabled — still let them through for this session. } onAcknowledge() } return ( {}} className="relative z-50">
Before you use the Drug Reference

This tool shows general health information from official FDA drug labels and matches symptoms to over-the-counter options. It is provided for information only.

  • It is not medical advice and not a substitute for a doctor, pharmacist, or nurse.
  • It is not a drug-interaction checker. Always read each product’s full label and check with a professional before combining medicines.
  • Situation matches come from label text, not clinical recommendations — they can be incomplete or include products you wouldn’t expect.
  • Always follow the directions on the actual product you have; dosages and warnings differ between products.
  • In an emergency, or if symptoms are severe, worsening, or you’re unsure,{' '} contact a medical professional or call emergency services.

Data is from openFDA (U.S. FDA, public domain). NOMAD is not affiliated with or endorsed by the FDA.

I understand — continue
) }