Type src/ against API and database shapes, fixing implicit anys
Adds .d.ts declarations beside the untyped JS modules imported from TS (api.js, navConfig.js, adminSchema.js, adminNav.js, src/data/*), with shapes taken from the server routes and migrations. get/post/ patch/del now return unknown unless the caller names the response. Fixes found along the way: - website/email/instagram are bare strings from splitLinks, not Link objects; OrganizationDetail's website and email pills rendered with no href or label and now link correctly. - The chapter map falls back to FALLBACK_COLOR for a region with no colour instead of painting its tiles black. Adds defineSection() so each page manifest entry's props are checked against its own Component. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5286cae9ca
commit
2428f4412a
39 changed files with 1318 additions and 343 deletions
|
|
@ -149,7 +149,15 @@ const EDGE_FADE = `linear-gradient(to right,
|
|||
transparent calc(50% + (${HALF_SLIDE} + ${FADE_DIST})))`;
|
||||
|
||||
{/* Functions */}
|
||||
function WaveText({ text, baseDelay = 0, step = 0.1 }) {
|
||||
function WaveText({
|
||||
text,
|
||||
baseDelay = 0,
|
||||
step = 0.1,
|
||||
}: {
|
||||
text: string;
|
||||
baseDelay?: number;
|
||||
step?: number;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
{text.split("").map((char, i) => (
|
||||
|
|
@ -179,7 +187,7 @@ export default function Home() {
|
|||
const prev = () => setIndex(i => Math.max(0, i - 1));
|
||||
const next = () => setIndex(i => Math.min(EVENTS.length - 1, i + 1));
|
||||
|
||||
const arrowStyle = enabled => ({
|
||||
const arrowStyle = (enabled: boolean) => ({
|
||||
border: `1px solid ${TEAL}`,
|
||||
background: "rgba(255,255,255,0.6)",
|
||||
color: enabled ? TEAL : "#b8c6c9",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue