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>
This commit is contained in:
21
apps/web/components/CsrfProvider.tsx
Normal file
21
apps/web/components/CsrfProvider.tsx
Normal file
@@ -0,0 +1,21 @@
|
||||
'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}</>;
|
||||
}
|
||||
Reference in New Issue
Block a user