'use client' import React, { useState } from 'react' import { useAgentAnalysis } from './_hooks/useAgentAnalysis' import { AnalysisResult } from './_components/AnalysisResult' import { AnalysisHistory } from './_components/AnalysisHistory' export default function AgentPage() { const [url, setUrl] = useState('') const { analyze, loading, error, result, history } = useAgentAnalysis() const handleSubmit = (e: React.FormEvent) => { e.preventDefault() if (!url.trim()) return analyze(url.trim()) } return (
{/* Header */}

Compliance Agent

Analysiere Webseiten auf DSGVO-Konformitaet. Der Agent holt das Dokument, klassifiziert es, bewertet das Risiko und weist die Aufgabe der zustaendigen Rolle zu.

{/* URL Input */}
setUrl(e.target.value)} placeholder="https://example.com/datenschutz" className="flex-1 px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-purple-500 focus:border-transparent text-sm" disabled={loading} required />
{/* Error */} {error && (
{error}
)} {/* Result */} {result && (
)} {/* History */} { setUrl(r.url) analyze(r.url) }} />
) }