Convert src/ JavaScript modules to TypeScript
Renames every .js module under src/ to .ts (api, useResource, adminSchema, navConfig, adminNav and src/data/*) and points imports, comments and the seed script's module paths at the new names. Their types now come from inference; no .d.ts files and no shape interfaces. tsc stays strict (noImplicitAny off). The errors inference leaves behind get the lightest fix that clears them: `any` on empty state, contexts and list defaults, `: any` on components with optional or spread props, class fields on ApiError, and option shapes on get/useResource. Kept as real types, since they belong to modules that were already TypeScript and later features import them: PageShell's ShellSection and props, useContent's corrected record types (website/email/ instagram are bare strings) and EventListItem, and TimelineRef's orgKind. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5cedc68fd7
commit
22d5328885
43 changed files with 195 additions and 135 deletions
|
|
@ -1,56 +0,0 @@
|
|||
// Single source of truth for navigation.
|
||||
// Add a page here and in App.jsx, and both tiers of the nav update.
|
||||
|
||||
export const PAGE_LINKS = [
|
||||
{ label: "Home", path: "/" },
|
||||
{ label: "Retreats", path: "/retreats" },
|
||||
{ label: "Community", path: "/community" },
|
||||
{ label: "Leadership", path: "/leadership" },
|
||||
{ label: "Resources", path: "/resources" },
|
||||
{ label: "History", path: "/history" },
|
||||
];
|
||||
|
||||
// Sections belong to a page, keyed by that page's path.
|
||||
// A page with no sections gets no subnav row.
|
||||
export const PAGE_SECTIONS = {
|
||||
"/": [
|
||||
{ label: "#About", hash: "#about" },
|
||||
{ label: "#Events", hash: "#events" },
|
||||
{ label: "#Connect", hash: "#connect" },
|
||||
],
|
||||
"/retreats": [
|
||||
{ label: "National", hash: "#national" },
|
||||
{ label: "Regional", hash: "#regional" },
|
||||
{ label: "Partner Events", hash: "#partner"},
|
||||
],
|
||||
"/community": [
|
||||
{ label: "Local Chapters", hash: "#local" },
|
||||
{ label: "Virtual Community", hash: "#virtual" },
|
||||
{ label: "Partner Organizations", hash: "#partners" },
|
||||
],
|
||||
"/leadership": [
|
||||
{ label: "Board & Staff", hash: "#board-staff" },
|
||||
{ label: "Retreat Team", hash: "#retreat-team" },
|
||||
{ label: "Committees & Volunteers", hash: "#committees" },
|
||||
{ label: "Contact Us", hash: "#contact" },
|
||||
],
|
||||
"/resources": [
|
||||
{ label: "Unity Teachings", hash: "#unity" },
|
||||
{ label: "Branding & Marketing", hash: "#branding" },
|
||||
{ label: "Partner Resources", hash: "#partner" },
|
||||
],
|
||||
"/history": [
|
||||
{ label: "Timeline", hash: "#timeline" },
|
||||
],
|
||||
};
|
||||
|
||||
// Right-side actions. `variant` picks the styling, not the destination.
|
||||
export const NAV_ACTIONS = [
|
||||
{ label: "Contact Us", to: "/leadership#contact", variant: "ghost" },
|
||||
{
|
||||
label: "Give",
|
||||
to: "/give",
|
||||
variant: "fancy",
|
||||
external: true,
|
||||
},
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue