- One mediaUrl in media.ts instead of 12 identical aliases and a kind map; orgPath builds on hrefs.ts's orgHref - One Logo component (hides itself or shows a fallback when the file is missing) for event cards, org lists and chapter marks - useHistory is a thin wrapper over useRecord - adminSchema.ts split into adminSchema/, one file per entity plus shared.ts; the registry is unchanged (checked by loading both) - JS smooth scrolls respect reduced motion (lib/motion.ts) - Content-Security-Policy in Report-Only, with /api/csp-report logging what it would block Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 lines
333 B
TypeScript
5 lines
333 B
TypeScript
/* Smooth scrolling, unless the visitor has asked for less motion.
|
|
index.css covers CSS scrolling; this is for scrollIntoView and
|
|
scrollTo calls, which don't read that setting themselves. */
|
|
export const scrollBehavior = (): ScrollBehavior =>
|
|
window.matchMedia('(prefers-reduced-motion: reduce)').matches ? 'auto' : 'smooth'
|