Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/thatdeveloperguy-website / app/routes.ts |
| Date | Not specified in source |
| Repository | Janady13/thatdeveloperguy-website |
| Revision | 2bea2ebdff0e34494bff597d4fa9c8422a0c3a94 |
| Branch | main |
| Path or archive member | app/routes.ts |
| Original SHA-256 | 0e04a702c97833dd61cf10dc5f4faa8070e19df21088f0bd30ccd8dc168d793f |
| Git blob SHA | 01453fd968149b1f7ccd1204508eddf466aee3f0 |
| Reading-copy SHA-256 | 0e04a702c97833dd61cf10dc5f4faa8070e19df21088f0bd30ccd8dc168d793f |
Recovered source transcript
Download complete source text ↓18 lines · 0.9 KB
import { type RouteConfig, index, route } from '@react-router/dev/routes';
import manifest from '../src/generated/route-manifest.json';
const MODULES: Record<string, string> = {
home: 'routes/home.tsx', audience: 'routes/audience.tsx', capabilities: 'routes/capabilities.tsx', capability: 'routes/capability.tsx',
company: 'routes/company.tsx', contact: 'routes/contact.tsx', 'contact-received': 'routes/contact-received.tsx', policy: 'routes/policy.tsx',
};
/** Routes come from the generated registry: one entry per compiled page, then the catch-all 404. */
export default [
...manifest.routes.map(entry => {
const file = MODULES[entry.template];
if (!file) throw new Error(`no route module for template ${entry.template}`);
return entry.path === '/' ? index(file, { id: entry.id }) : route(entry.path.slice(1), file, { id: entry.id });
}),
route('*', 'routes/not-found.tsx'),
] satisfies RouteConfig;