Files
skillhub/apps/web/components/CsrfProvider.tsx
airano 97b427831a Initial release v1.0.0
Open-source marketplace for AI Agent skills.

Features:
- Next.js 15 web app with i18n (en/fa)
- CLI tool for skill installation (npx skillhub)
- GitHub crawler/indexer with multi-strategy discovery
- Security scanning for all indexed skills
- Self-hostable with Docker

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 06:42:07 +03:30

22 lines
497 B
TypeScript

'use client';
import { useEffect } from 'react';
import { initializeCsrfToken } from '@/lib/csrf-client';
interface CsrfProviderProps {
children: React.ReactNode;
}
/**
* Provider component that initializes the CSRF token on mount.
* This ensures the token is available for protected API requests.
*/
export function CsrfProvider({ children }: CsrfProviderProps) {
useEffect(() => {
// Initialize CSRF token on mount
initializeCsrfToken();
}, []);
return <>{children}</>;
}