website refactor

This commit is contained in:
2026-01-15 17:12:24 +01:00
parent c3b308e960
commit f035cfe7ce
468 changed files with 24378 additions and 17324 deletions

View File

@@ -1,6 +1,6 @@
'use client';
import React, { Component, ReactNode } from 'react';
import React, { Component, ReactNode, useState } from 'react';
import { ApiError } from '@/lib/api/base/ApiError';
import { connectionMonitor } from '@/lib/api/base/ApiConnectionMonitor';
import { ErrorDisplay } from './ErrorDisplay';
@@ -45,7 +45,7 @@ export class ApiErrorBoundary extends Component<Props, State> {
throw error;
}
componentDidCatch(error: Error, errorInfo: React.ErrorInfo): void {
componentDidCatch(error: Error): void {
if (error instanceof ApiError) {
// Report to connection monitor
connectionMonitor.recordFailure(error);
@@ -130,8 +130,8 @@ export class ApiErrorBoundary extends Component<Props, State> {
* Hook-based alternative for functional components
*/
export function useApiErrorBoundary() {
const [error, setError] = React.useState<ApiError | null>(null);
const [isDev] = React.useState(process.env.NODE_ENV === 'development');
const [error, setError] = useState<ApiError | null>(null);
const [isDev] = useState(process.env.NODE_ENV === 'development');
const handleError = (err: ApiError) => {
setError(err);