import React, { useEffect, useState } from 'react'; import ViolationForm from './components/ViolationForm'; const styles = { body: { fontFamily: "'Segoe UI', Tahoma, Geneva, Verdana, sans-serif", background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)', minHeight: '100vh', padding: '20px', margin: 0, }, container: { maxWidth: '1200px', margin: '0 auto', background: 'white', borderRadius: '12px', boxShadow: '0 20px 60px rgba(0,0,0,0.3)', overflow: 'hidden', }, header: { background: 'linear-gradient(135deg, #2c3e50 0%, #34495e 100%)', color: 'white', padding: '30px', textAlign: 'center', }, statusBar: { fontSize: '11px', color: '#aaa', marginTop: '6px', } }; export default function App() { const [apiStatus, setApiStatus] = useState('checking...'); useEffect(() => { fetch('/api/health') .then(r => r.json()) .then(() => setApiStatus('● API connected')) .catch(() => setApiStatus('⚠ API unreachable')); }, []); return (
Generate Individual Violation Records with Contextual Fields
{apiStatus}