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>
38 lines
1.2 KiB
TypeScript
38 lines
1.2 KiB
TypeScript
import { Link } from "react-router-dom";
|
|
|
|
/* ═══════════════════════════════════════════════════════════════
|
|
ARROW LINK
|
|
═══════════════════════════════════════════════════════════════ */
|
|
|
|
type ArrowLinkProps = {
|
|
to: string;
|
|
label: string;
|
|
color: string;
|
|
/** Tailwind size classes for the circle. */
|
|
size?: string;
|
|
};
|
|
|
|
export default function ArrowLink({ to, label, color, size = "h-9 w-9" }: ArrowLinkProps) {
|
|
return (
|
|
<Link
|
|
to={to}
|
|
aria-label={label}
|
|
title={label}
|
|
className={`${size} shrink-0 rounded-full flex items-center justify-center transition-transform duration-200 hover:scale-110`}
|
|
style={{ border: `1px solid ${color}`, color }}
|
|
>
|
|
<svg
|
|
viewBox="0 0 24 24"
|
|
className="h-4 w-4"
|
|
fill="none"
|
|
stroke="currentColor"
|
|
strokeWidth="2.5"
|
|
strokeLinecap="round"
|
|
strokeLinejoin="round"
|
|
aria-hidden="true"
|
|
>
|
|
<path d="M5 12h14M13 6l6 6-6 6" />
|
|
</svg>
|
|
</Link>
|
|
);
|
|
}
|