Files
documenso/packages/email/preview/app/routes/_index.tsx
2026-06-22 14:33:34 +10:00

14 lines
328 B
TypeScript

import { redirect } from 'react-router';
import { templates } from '../lib/templates';
/**
* The index has no UI of its own — redirect to the first template so the
* preview always opens on something.
*/
export const loader = () => {
const firstSlug = Object.keys(templates)[0];
return redirect(`/${firstSlug}`);
};