Convert all v5 JS/JSX source files to TS/TSX, add tsconfig.json, install typescript and @types/react* dev deps, add typecheck npm script, create types.ts with shared prop types, and update Tailwind CSS source glob and shadcn components.json to include TS extensions.
3 lines
133 B
TypeScript
3 lines
133 B
TypeScript
export function csrfToken(): string {
|
|
return document.querySelector('meta[name="csrf-token"]')?.getAttribute('content') ?? '';
|
|
}
|