mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 15:52:10 +01:00
fix: address multiple PR review issues
- Fixed accessibility in audit logs with keyboard navigation and ARIA attributes - Refactored ThreatAnalysisResults interface to module level for reusability - Added BatchOperation enum validation and proper CSV escaping in batch monitoring - Removed unused company state causing skeleton view in dashboard overview - Enhanced error handling with user-facing messages for metrics loading - Replaced hardcoded timeouts with condition-based waits in E2E tests - Removed duplicate state management in security monitoring hooks - Fixed CSRF documentation to show proper secret fallback pattern - Updated CSP metrics docs with GDPR Article 6(1)(f) legal basis clarification - Fixed React hooks order to prevent conditional execution after early returns - Added explicit button type to prevent form submission behavior
This commit is contained in:
@ -52,23 +52,14 @@ interface SecurityAlert {
|
||||
}
|
||||
|
||||
/**
|
||||
* Custom hook for security monitoring state
|
||||
* Custom hook for security monitoring UI state (UI-only, no data fetching)
|
||||
*/
|
||||
function useSecurityMonitoringState() {
|
||||
const [metrics, setMetrics] = useState<SecurityMetrics | null>(null);
|
||||
const [alerts, setAlerts] = useState<SecurityAlert[]>([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [selectedTimeRange, setSelectedTimeRange] = useState("24h");
|
||||
const [showConfig, setShowConfig] = useState(false);
|
||||
const [autoRefresh, setAutoRefresh] = useState(true);
|
||||
|
||||
return {
|
||||
metrics,
|
||||
setMetrics,
|
||||
alerts,
|
||||
setAlerts,
|
||||
loading,
|
||||
setLoading,
|
||||
selectedTimeRange,
|
||||
setSelectedTimeRange,
|
||||
showConfig,
|
||||
|
||||
Reference in New Issue
Block a user