code quality
This commit is contained in:
@@ -6,7 +6,7 @@ import { useEffectiveDriverId } from "@/hooks/useEffectiveDriverId";
|
||||
import { ApiConnectionMonitor } from '@/lib/gateways/api/base/ApiConnectionMonitor';
|
||||
import { CircuitBreakerRegistry } from '@/lib/gateways/api/base/RetryHandler';
|
||||
import { getGlobalErrorHandler } from '@/lib/infrastructure/GlobalErrorHandler';
|
||||
import { ChevronUp, Wrench, X } from 'lucide-react';
|
||||
import { ChevronDown, ChevronUp, Wrench, X } from 'lucide-react';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
// Import our new components
|
||||
|
||||
@@ -64,13 +64,18 @@ interface NavigatorWithConnection extends Navigator {
|
||||
};
|
||||
}
|
||||
|
||||
interface ErrorAnalyticsDashboardProps {
|
||||
refreshInterval?: number;
|
||||
showInProduction?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Comprehensive Error Analytics Dashboard
|
||||
* Shows real-time error statistics, API metrics, and environment details
|
||||
*/
|
||||
export function ErrorAnalyticsDashboard({
|
||||
export function ErrorAnalyticsDashboard({
|
||||
refreshInterval = 5000,
|
||||
showInProduction = false
|
||||
showInProduction = false
|
||||
}: ErrorAnalyticsDashboardProps) {
|
||||
const [stats, setStats] = useState<ErrorStats | null>(null);
|
||||
const [isExpanded, setIsExpanded] = useState(true);
|
||||
|
||||
@@ -54,13 +54,13 @@ export function LeagueOwnershipTransfer({
|
||||
{ownerSummary ? (
|
||||
<DriverSummaryPill
|
||||
driver={new DriverViewModel({
|
||||
id: ownerSummary.driver.id,
|
||||
name: ownerSummary.driver.name,
|
||||
avatarUrl: ownerSummary.driver.avatarUrl ?? null,
|
||||
iracingId: ownerSummary.driver.iracingId,
|
||||
country: ownerSummary.driver.country,
|
||||
bio: ownerSummary.driver.bio,
|
||||
joinedAt: ownerSummary.driver.joinedAt,
|
||||
id: ownerSummary.id,
|
||||
name: ownerSummary.name,
|
||||
avatarUrl: ownerSummary.avatarUrl ?? null,
|
||||
iracingId: undefined, // Missing in summary
|
||||
country: '—', // Missing in summary
|
||||
bio: undefined, // Missing in summary
|
||||
joinedAt: '—', // Missing in summary
|
||||
})}
|
||||
rating={ownerSummary.rating}
|
||||
rank={ownerSummary.rank}
|
||||
@@ -98,8 +98,8 @@ export function LeagueOwnershipTransfer({
|
||||
options={[
|
||||
{ value: '', label: 'Select new owner...' },
|
||||
...settings.members.map((member) => ({
|
||||
value: member.driver.id,
|
||||
label: member.driver.name,
|
||||
value: member.id,
|
||||
label: member.name,
|
||||
})),
|
||||
]}
|
||||
/>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import { LeagueCard } from '@/components/leagues/LeagueCardWrapper';
|
||||
import { LeagueSummaryViewModelBuilder } from '@/lib/builders/view-models/LeagueSummaryViewModelBuilder';
|
||||
import { LeagueSummaryViewModel } from '@/lib/view-models/LeagueSummaryViewModel';
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
import type { LeaguesViewData } from '@/lib/view-data/LeaguesViewData';
|
||||
import { Button } from '@/ui/Button';
|
||||
@@ -129,8 +129,8 @@ export function LeagueSlider({
|
||||
hideScrollbar
|
||||
>
|
||||
{leagues.map((league) => {
|
||||
const viewModel = LeagueSummaryViewModelBuilder.build(league);
|
||||
|
||||
const viewModel = new LeagueSummaryViewModel(league);
|
||||
|
||||
return (
|
||||
<Stack key={league.id} flexShrink={0} w="320px">
|
||||
<Link href={routes.league.detail(league.id)} block>
|
||||
|
||||
Reference in New Issue
Block a user