code quality
This commit is contained in:
@@ -2,6 +2,7 @@ import { RatingFormatter } from '@/lib/formatters/RatingFormatter';
|
||||
import { Avatar } from '@/ui/Avatar';
|
||||
import { Group } from '@/ui/Group';
|
||||
import { Surface } from '@/ui/Surface';
|
||||
import { Text } from '@/ui/Text';
|
||||
|
||||
interface PodiumDriver {
|
||||
id: string;
|
||||
|
||||
@@ -5,6 +5,7 @@ import { Group } from '@/ui/Group';
|
||||
import { Input } from '@/ui/Input';
|
||||
import { Panel } from '@/ui/Panel';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { TextArea } from '@/ui/TextArea';
|
||||
|
||||
interface ProfileDetailsPanelProps {
|
||||
|
||||
@@ -3,10 +3,11 @@ import { enhanceQueryResult } from '@/lib/di/hooks/useReactQueryWithApiError';
|
||||
import { LEAGUE_SERVICE_TOKEN } from '@/lib/di/tokens';
|
||||
import { DateFormatter } from '@/lib/formatters/DateFormatter';
|
||||
import type { RaceDTO } from '@/lib/types/generated/RaceDTO';
|
||||
import { LeagueScheduleRaceViewModel, LeagueScheduleViewModel } from '@/lib/view-models/LeagueScheduleViewModel';
|
||||
import { LeagueScheduleViewModel } from '@/lib/view-models/LeagueScheduleViewModel';
|
||||
import type { ILeagueScheduleRaceViewModel } from '@/lib/view-models/LeagueScheduleRaceViewModel';
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
|
||||
function mapRaceDtoToViewModel(race: RaceDTO): LeagueScheduleRaceViewModel {
|
||||
function mapRaceDtoToViewModel(race: RaceDTO): ILeagueScheduleRaceViewModel {
|
||||
const scheduledAt = race.date ? new Date(race.date) : new Date(0);
|
||||
const now = new Date();
|
||||
const isPast = scheduledAt.getTime() < now.getTime();
|
||||
|
||||
@@ -6,10 +6,10 @@ import type { LeagueSeasonSummaryDTO } from '@/lib/types/generated/LeagueSeasonS
|
||||
import type { RaceDTO } from '@/lib/types/generated/RaceDTO';
|
||||
import { LeagueRoleUtility } from '@/lib/utilities/LeagueRoleUtility';
|
||||
import { LeagueAdminScheduleViewModel } from '@/lib/view-models/LeagueAdminScheduleViewModel';
|
||||
import { LeagueScheduleRaceViewModel } from '@/lib/view-models/LeagueScheduleViewModel';
|
||||
import { LeagueSeasonSummaryViewModel } from '@/lib/view-models/LeagueSeasonSummaryViewModel';
|
||||
import type { ILeagueScheduleRaceViewModel } from '@/lib/view-models/LeagueScheduleRaceViewModel';
|
||||
|
||||
function mapRaceDtoToViewModel(race: RaceDTO): LeagueScheduleRaceViewModel {
|
||||
function mapRaceDtoToViewModel(race: RaceDTO): ILeagueScheduleRaceViewModel {
|
||||
const scheduledAt = race.date ? new Date(race.date) : new Date(0);
|
||||
const now = new Date();
|
||||
const isPast = scheduledAt.getTime() < now.getTime();
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
import { getWebsiteApiBaseUrl } from '@/lib/config/apiBaseUrl';
|
||||
import { Result } from '@/lib/contracts/Result';
|
||||
import { DomainError } from '@/lib/contracts/services/Service';
|
||||
import { MediaBinaryDTO } from '@/lib/types/generated/MediaBinaryDTO';
|
||||
import { MediaBinaryDTO } from '@/lib/types/MediaBinaryDTO';
|
||||
|
||||
// TODO why is this an adapter?
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { ViewDataBuilder } from '../../contracts/builders/ViewDataBuilder';
|
||||
import type { DashboardStatsResponseDto } from '../../types/generated/DashboardStatsResponseDTO';
|
||||
import type { DashboardStatsResponseDTO } from '../../types/generated/DashboardStatsResponseDTO';
|
||||
import type { AdminDashboardViewData } from '../../view-data/AdminDashboardViewData';
|
||||
|
||||
export class AdminDashboardViewDataBuilder {
|
||||
@@ -9,7 +9,7 @@ export class AdminDashboardViewDataBuilder {
|
||||
* @param apiDto - The DTO from the service
|
||||
* @returns ViewData for the admin dashboard
|
||||
*/
|
||||
public static build(apiDto: DashboardStatsResponseDto): AdminDashboardViewData {
|
||||
public static build(apiDto: DashboardStatsResponseDTO): AdminDashboardViewData {
|
||||
return {
|
||||
stats: {
|
||||
totalUsers: apiDto.totalUsers,
|
||||
@@ -24,4 +24,4 @@ export class AdminDashboardViewDataBuilder {
|
||||
}
|
||||
}
|
||||
|
||||
AdminDashboardViewDataBuilder satisfies ViewDataBuilder<DashboardStatsResponseDto, AdminDashboardViewData>;
|
||||
AdminDashboardViewDataBuilder satisfies ViewDataBuilder<DashboardStatsResponseDTO, AdminDashboardViewData>;
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
|
||||
|
||||
import type { ViewDataBuilder } from '@/lib/contracts/builders/ViewDataBuilder';
|
||||
import type { ForgotPasswordPageDTO } from '@/lib/types/generated/ForgotPasswordPageDTO';
|
||||
import type { ForgotPasswordPageDTO } from '@/lib/services/auth/types/ForgotPasswordPageDTO';
|
||||
import type { ForgotPasswordViewData } from '@/lib/view-data/ForgotPasswordViewData';
|
||||
|
||||
export class ForgotPasswordViewDataBuilder {
|
||||
public static build(apiDto: ForgotPasswordPageDTO): ForgotPasswordViewData {
|
||||
return {
|
||||
returnTo: apiDto.returnTo,
|
||||
returnTo: apiDto.returnTo || '',
|
||||
showSuccess: false,
|
||||
formState: {
|
||||
fields: {
|
||||
|
||||
@@ -5,9 +5,11 @@ import { HealthAlertFormatter } from '@/lib/formatters/HealthAlertFormatter';
|
||||
import { HealthComponentFormatter } from '@/lib/formatters/HealthComponentFormatter';
|
||||
import { HealthMetricFormatter } from '@/lib/formatters/HealthMetricFormatter';
|
||||
import { HealthStatusFormatter } from '@/lib/formatters/HealthStatusFormatter';
|
||||
import type { HealthDTO } from '@/lib/types/generated/HealthDTO';
|
||||
import type { HealthDTO } from '../../../../api/src/domain/health/HealthDTO';
|
||||
import type { HealthAlert, HealthComponent, HealthMetrics, HealthStatus, HealthViewData } from '@/lib/view-data/HealthViewData';
|
||||
|
||||
export type { HealthDTO };
|
||||
|
||||
export class HealthViewDataBuilder {
|
||||
public static build(apiDto: HealthDTO): HealthViewData {
|
||||
const now = new Date();
|
||||
@@ -38,7 +40,7 @@ export class HealthViewDataBuilder {
|
||||
};
|
||||
|
||||
// Build components
|
||||
const components: HealthComponent[] = (apiDto.components || []).map((component) => ({
|
||||
const components: HealthComponent[] = (apiDto.components || []).map((component: { name: string; status: 'ok' | 'degraded' | 'error' | 'unknown'; lastCheck?: string; responseTime?: number; errorRate?: number; }) => ({
|
||||
name: component.name,
|
||||
status: component.status,
|
||||
statusLabel: HealthComponentFormatter.formatStatusLabel(component.status),
|
||||
@@ -51,7 +53,7 @@ export class HealthViewDataBuilder {
|
||||
}));
|
||||
|
||||
// Build alerts
|
||||
const alerts: HealthAlert[] = (apiDto.alerts || []).map((alert) => ({
|
||||
const alerts: HealthAlert[] = (apiDto.alerts || []).map((alert: { id: string; type: 'critical' | 'warning' | 'info'; title: string; message: string; timestamp: string; }) => ({
|
||||
id: alert.id,
|
||||
type: alert.type,
|
||||
title: alert.title,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
import type { ViewDataBuilder } from '@/lib/contracts/builders/ViewDataBuilder';
|
||||
import type { MediaBinaryDTO } from '@/lib/types/generated/MediaBinaryDTO';
|
||||
import type { MediaBinaryDTO } from '@/lib/types/MediaBinaryDTO';
|
||||
import type { LeagueCoverViewData } from '@/lib/view-data/LeagueCoverViewData';
|
||||
|
||||
export class LeagueCoverViewDataBuilder {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use client';
|
||||
|
||||
import type { MediaBinaryDTO } from '@/lib/types/generated/MediaBinaryDTO';
|
||||
import type { LeagueLogoViewData } from '@/lib/view-data/LeagueLogoViewData';
|
||||
|
||||
import type { ViewDataBuilder } from '@/lib/contracts/builders/ViewDataBuilder';
|
||||
import type { MediaBinaryDTO } from '@/lib/types/MediaBinaryDTO';
|
||||
import type { LeagueLogoViewData } from '@/lib/view-data/LeagueLogoViewData';
|
||||
|
||||
export class LeagueLogoViewDataBuilder {
|
||||
public static build(apiDto: MediaBinaryDTO): LeagueLogoViewData {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import type { ViewDataBuilder } from '@/lib/contracts/builders/ViewDataBuilder';
|
||||
import { DateFormatter } from '@/lib/formatters/DateFormatter';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use client';
|
||||
|
||||
import type { LeagueScheduleViewData } from '@/lib/view-data/LeagueScheduleViewData';
|
||||
import type { LeagueScheduleDTO } from '@/lib/types/generated/LeagueScheduleDTO';
|
||||
|
||||
import type { ViewDataBuilder } from '@/lib/contracts/builders/ViewDataBuilder';
|
||||
import type { LeagueScheduleDTO } from '@/lib/types/generated/LeagueScheduleDTO';
|
||||
import type { LeagueScheduleViewData } from '@/lib/view-data/LeagueScheduleViewData';
|
||||
|
||||
export class LeagueScheduleViewDataBuilder {
|
||||
public static build(apiDto: LeagueScheduleDTO, currentDriverId?: string, isAdmin: boolean = false): LeagueScheduleViewData {
|
||||
@@ -24,7 +24,7 @@ export class LeagueScheduleViewDataBuilder {
|
||||
sessionType: race.sessionType || 'race',
|
||||
isPast,
|
||||
isUpcoming,
|
||||
status: race.status || (isPast ? 'completed' : 'scheduled'),
|
||||
status: (race.status || (isPast ? 'completed' : 'scheduled')) as 'scheduled' | 'completed',
|
||||
// Registration info (would come from API in real implementation)
|
||||
isUserRegistered: false,
|
||||
canRegister: isUpcoming,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
'use client';
|
||||
|
||||
import type { LeagueSettingsViewData } from '@/lib/view-data/LeagueSettingsViewData';
|
||||
|
||||
import type { ViewDataBuilder } from '@/lib/contracts/builders/ViewDataBuilder';
|
||||
import type { LeagueSettingsViewData } from '@/lib/view-data/LeagueSettingsViewData';
|
||||
|
||||
type LeagueSettingsInputDTO = {
|
||||
league: { id: string; name: string; ownerId: string; createdAt: string };
|
||||
|
||||
@@ -1,16 +1,12 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import type { ViewDataBuilder } from '@/lib/contracts/builders/ViewDataBuilder';
|
||||
import { DateFormatter } from '@/lib/formatters/DateFormatter';
|
||||
import { StatusFormatter } from '@/lib/formatters/StatusFormatter';
|
||||
import type { LeagueSponsorshipsApiDto } from '@/lib/types/tbd/LeagueSponsorshipsApiDto';
|
||||
import type { LeagueSponsorshipsViewData } from '@/lib/view-data/LeagueSponsorshipsViewData';
|
||||
import type { ViewDataBuilder } from '@/lib/contracts/builders/ViewDataBuilder';
|
||||
import type { GetSeasonSponsorshipsOutputDTO } from '@/lib/types/generated/GetSeasonSponsorshipsOutputDTO';
|
||||
|
||||
type LeagueSponsorshipsInputDTO = GetSeasonSponsorshipsOutputDTO & {
|
||||
leagueId: string;
|
||||
league: { id: string; name: string; description: string };
|
||||
sponsorshipSlots: LeagueSponsorshipsViewData['sponsorshipSlots'];
|
||||
}
|
||||
type LeagueSponsorshipsInputDTO = LeagueSponsorshipsApiDto;
|
||||
|
||||
export class LeagueSponsorshipsViewDataBuilder {
|
||||
public static build(apiDto: LeagueSponsorshipsInputDTO): LeagueSponsorshipsViewData {
|
||||
@@ -20,13 +16,13 @@ export class LeagueSponsorshipsViewDataBuilder {
|
||||
onTabChange: () => {},
|
||||
league: apiDto.league,
|
||||
sponsorshipSlots: apiDto.sponsorshipSlots,
|
||||
sponsorshipRequests: apiDto.sponsorships.map(r => ({
|
||||
sponsorshipRequests: apiDto.sponsorshipRequests.map(r => ({
|
||||
id: r.id,
|
||||
slotId: '', // Missing in DTO
|
||||
sponsorId: '', // Missing in DTO
|
||||
sponsorName: '', // Missing in DTO
|
||||
requestedAt: r.createdAt,
|
||||
formattedRequestedAt: DateFormatter.formatShort(r.createdAt),
|
||||
slotId: r.slotId,
|
||||
sponsorId: r.sponsorId,
|
||||
sponsorName: r.sponsorName,
|
||||
requestedAt: r.requestedAt,
|
||||
formattedRequestedAt: DateFormatter.formatShort(r.requestedAt),
|
||||
status: r.status as 'pending' | 'approved' | 'rejected',
|
||||
statusLabel: StatusFormatter.protestStatus(r.status),
|
||||
})),
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
'use client';
|
||||
|
||||
import type { LeagueStandingsViewData } from '@/lib/view-data/LeagueStandingsViewData';
|
||||
import type { LeagueStandingDTO } from '@/lib/types/generated/LeagueStandingDTO';
|
||||
import type { LeagueMemberDTO } from '@/lib/types/generated/LeagueMemberDTO';
|
||||
|
||||
import type { ViewDataBuilder } from '@/lib/contracts/builders/ViewDataBuilder';
|
||||
import type { LeagueMemberDTO } from '@/lib/types/generated/LeagueMemberDTO';
|
||||
import type { LeagueStandingDTO } from '@/lib/types/generated/LeagueStandingDTO';
|
||||
import type { LeagueStandingsViewData } from '@/lib/view-data/LeagueStandingsViewData';
|
||||
|
||||
interface LeagueStandingsApiDto {
|
||||
standings: LeagueStandingDTO[];
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import type { ViewDataBuilder } from '@/lib/contracts/builders/ViewDataBuilder';
|
||||
import { NumberFormatter } from '@/lib/formatters/NumberFormatter';
|
||||
import type { GetLeagueWalletOutputDTO } from '@/lib/types/generated/GetLeagueWalletOutputDTO';
|
||||
import type { LeagueWalletViewData } from '@/lib/view-data/LeagueWalletViewData';
|
||||
import type { WalletTransactionViewData } from '@/lib/view-data/WalletTransactionViewData';
|
||||
import type { ViewDataBuilder } from '@/lib/contracts/builders/ViewDataBuilder';
|
||||
import { NumberFormatter } from '@/lib/formatters/NumberFormatter';
|
||||
|
||||
type LeagueWalletInputDTO = GetLeagueWalletOutputDTO & {
|
||||
leagueId: string;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import type { ViewDataBuilder } from '@/lib/contracts/builders/ViewDataBuilder';
|
||||
import type { AllLeaguesWithCapacityAndScoringDTO } from '@/lib/types/generated/AllLeaguesWithCapacityAndScoringDTO';
|
||||
import type { LeaguesViewData } from '@/lib/view-data/LeaguesViewData';
|
||||
import type { ViewDataBuilder } from '@/lib/contracts/builders/ViewDataBuilder';
|
||||
|
||||
export class LeaguesViewDataBuilder {
|
||||
public static build(apiDto: AllLeaguesWithCapacityAndScoringDTO): LeaguesViewData {
|
||||
@@ -29,7 +29,7 @@ export class LeaguesViewDataBuilder {
|
||||
scoring: league.scoring ? {
|
||||
gameId: league.scoring.gameId,
|
||||
gameName: league.scoring.gameName,
|
||||
primaryChampionshipType: league.scoring.primaryChampionshipType,
|
||||
primaryChampionshipType: league.scoring.primaryChampionshipType as "driver" | "team" | "nations" | "trophy",
|
||||
scoringPresetId: league.scoring.scoringPresetId,
|
||||
scoringPresetName: league.scoring.scoringPresetName,
|
||||
dropPolicySummary: league.scoring.dropPolicySummary,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
'use client';
|
||||
|
||||
import type { LoginPageDTO } from '@/lib/types/generated/LoginPageDTO';
|
||||
import type { LoginViewData } from '@/lib/view-data/LoginViewData';
|
||||
|
||||
import type { ViewDataBuilder } from '@/lib/contracts/builders/ViewDataBuilder';
|
||||
import type { LoginPageDTO } from '@/lib/services/auth/types/LoginPageDTO';
|
||||
import type { LoginViewData } from '@/lib/view-data/LoginViewData';
|
||||
|
||||
export class LoginViewDataBuilder {
|
||||
public static build(apiDto: LoginPageDTO): LoginViewData {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import type { SponsorLogoViewData } from '@/lib/view-data/SponsorLogoViewData';
|
||||
import { MediaBinaryDTO } from '@/lib/types/generated/MediaBinaryDTO';
|
||||
import { MediaBinaryDTO } from '@/lib/types/MediaBinaryDTO';
|
||||
import { GetMediaOutputDTO } from '@/lib/types/generated/GetMediaOutputDTO';
|
||||
|
||||
import { ViewDataBuilder } from "../../contracts/builders/ViewDataBuilder";
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
import type { TeamLogoViewData } from '@/lib/view-data/TeamLogoViewData';
|
||||
import { MediaBinaryDTO } from '@/lib/types/generated/MediaBinaryDTO';
|
||||
import { MediaBinaryDTO } from '@/lib/types/MediaBinaryDTO';
|
||||
import { GetMediaOutputDTO } from '@/lib/types/generated/GetMediaOutputDTO';
|
||||
|
||||
import { ViewDataBuilder } from "../../contracts/builders/ViewDataBuilder";
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* Deterministic; side-effect free; no HTTP calls.
|
||||
*/
|
||||
|
||||
import type { MediaBinaryDTO } from '@/lib/types/generated/MediaBinaryDTO';
|
||||
import type { MediaBinaryDTO } from '@/lib/types/MediaBinaryDTO';
|
||||
import type { TrackImageViewData } from '@/lib/view-data/TrackImageViewData';
|
||||
|
||||
import { ViewDataBuilder } from "../../contracts/builders/ViewDataBuilder";
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
/**
|
||||
* ForgotPasswordPageDTO
|
||||
*
|
||||
* DTO for the forgot password page.
|
||||
*/
|
||||
export interface ForgotPasswordPageDTO {
|
||||
returnTo?: string;
|
||||
}
|
||||
9
apps/website/lib/types/MediaBinaryDTO.ts
Normal file
9
apps/website/lib/types/MediaBinaryDTO.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* MediaBinaryDTO
|
||||
*
|
||||
* Represents binary media data fetched from the API.
|
||||
*/
|
||||
export interface MediaBinaryDTO {
|
||||
buffer: ArrayBuffer;
|
||||
contentType: string;
|
||||
}
|
||||
@@ -15,7 +15,7 @@ export interface LeagueScheduleViewData extends ViewData {
|
||||
sessionType: string;
|
||||
isPast: boolean;
|
||||
isUpcoming: boolean;
|
||||
status: string;
|
||||
status: 'scheduled' | 'completed';
|
||||
strengthOfField?: number;
|
||||
isUserRegistered: boolean;
|
||||
canRegister: boolean;
|
||||
|
||||
@@ -8,9 +8,12 @@ export interface StandingEntryViewData {
|
||||
driverId: string;
|
||||
position: number;
|
||||
points: number;
|
||||
totalPoints: number;
|
||||
wins: number;
|
||||
podiums: number;
|
||||
races: number;
|
||||
racesStarted: number;
|
||||
avgFinish: number;
|
||||
leaderPoints: number;
|
||||
nextPoints: number;
|
||||
currentUserId: string;
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { AdminDangerZonePanel } from '@/components/admin/AdminDangerZonePanel';
|
||||
import { AdminHeaderPanel } from '@/components/admin/AdminHeaderPanel';
|
||||
import { AdminSectionHeader } from '@/components/admin/AdminSectionHeader';
|
||||
import { AdminStatsPanel } from '@/components/admin/AdminStatsPanel';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
import { AdminDashboardViewData } from '@/lib/view-data/AdminDashboardViewData';
|
||||
import { Badge } from '@/ui/Badge';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Card } from '@/ui/Card';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { Grid } from '@/ui/Grid';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { QuickActionLink } from '@/ui/QuickActionLink';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Badge } from '@/ui/Badge';
|
||||
import { QuickActionLink } from '@/ui/QuickActionLink';
|
||||
import {
|
||||
Activity,
|
||||
Clock,
|
||||
RefreshCw,
|
||||
Shield,
|
||||
Users
|
||||
Activity,
|
||||
Clock,
|
||||
RefreshCw,
|
||||
Shield,
|
||||
Users
|
||||
} from 'lucide-react';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
|
||||
/**
|
||||
* AdminDashboardTemplate
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { AdminDataTable } from '@/components/admin/AdminDataTable';
|
||||
import { AdminEmptyState } from '@/components/admin/AdminEmptyState';
|
||||
@@ -7,16 +7,14 @@ import { AdminStatsPanel } from '@/components/admin/AdminStatsPanel';
|
||||
import { AdminUsersTable } from '@/components/admin/AdminUsersTable';
|
||||
import { BulkActionBar } from '@/components/admin/BulkActionBar';
|
||||
import { UserFilters } from '@/components/admin/UserFilters';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
import { AdminUsersViewData } from '@/lib/view-data/AdminUsersViewData';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { ErrorBanner } from '@/ui/ErrorBanner';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { RefreshCw, ShieldAlert, Users } from 'lucide-react';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
|
||||
// We need to add InlineNotice to UIComponents if it's used
|
||||
// For now I'll assume it's a component or I'll add it to UIComponents
|
||||
|
||||
@@ -1,39 +1,39 @@
|
||||
'use client';
|
||||
|
||||
import { FormEvent } from 'react';
|
||||
import { LeagueReviewSummary } from '@/components/leagues/LeagueReviewSummary';
|
||||
import { Card } from '@/ui/Card';
|
||||
import { Heading } from '@/ui/Heading';
|
||||
import { Input } from '@/ui/Input';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Grid } from '@/ui/Grid';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import {
|
||||
AlertCircle,
|
||||
Check,
|
||||
ChevronLeft,
|
||||
ChevronRight,
|
||||
FileText,
|
||||
Loader2,
|
||||
Sparkles,
|
||||
} from 'lucide-react';
|
||||
|
||||
import { LeagueBasicsSection } from '@/components/leagues/LeagueBasicsSection';
|
||||
import { LeagueDropSection } from '@/components/leagues/LeagueDropSection';
|
||||
import { LeagueReviewSummary } from '@/components/leagues/LeagueReviewSummary';
|
||||
import {
|
||||
ChampionshipsSection,
|
||||
ScoringPatternSection
|
||||
ChampionshipsSection,
|
||||
ScoringPatternSection
|
||||
} from '@/components/leagues/LeagueScoringSection';
|
||||
import { LeagueStewardingSection } from '@/components/leagues/LeagueStewardingSection';
|
||||
import { LeagueStructureSection } from '@/components/leagues/LeagueStructureSection';
|
||||
import { LeagueTimingsSection } from '@/components/leagues/LeagueTimingsSection';
|
||||
import { LeagueVisibilitySection } from '@/components/leagues/LeagueVisibilitySection';
|
||||
import type { LeagueScoringPresetViewModel } from '@/lib/view-models/LeagueScoringPresetViewModel';
|
||||
import type { WizardErrors } from '@/lib/types/WizardErrors';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
import type { WizardErrors } from '@/lib/types/WizardErrors';
|
||||
import type { LeagueScoringPresetViewModel } from '@/lib/view-models/LeagueScoringPresetViewModel';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Card } from '@/ui/Card';
|
||||
import { Grid } from '@/ui/Grid';
|
||||
import { Heading } from '@/ui/Heading';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { Input } from '@/ui/Input';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import {
|
||||
AlertCircle,
|
||||
Check,
|
||||
ChevronLeft,
|
||||
ChevronRight,
|
||||
FileText,
|
||||
Loader2,
|
||||
Sparkles,
|
||||
} from 'lucide-react';
|
||||
import { FormEvent } from 'react';
|
||||
|
||||
export type Step = 1 | 2 | 3 | 4 | 5 | 6 | 7;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { DashboardKpiRow } from '@/components/dashboard/DashboardKpiRow';
|
||||
import { RecentActivityTable, type ActivityItem } from '@/components/dashboard/RecentActivityTable';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { AchievementGrid } from '@/components/achievements/AchievementGrid';
|
||||
import { RatingBreakdown } from '@/components/drivers/RatingBreakdown';
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
'use client';
|
||||
|
||||
import React from 'react';
|
||||
import { Trophy, ChevronLeft } from 'lucide-react';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { PageHeader } from '@/ui/PageHeader';
|
||||
import { RankingsPodium } from '@/components/leaderboards/RankingsPodium';
|
||||
import { LeaderboardTable } from '@/components/leaderboards/LeaderboardTable';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
|
||||
import { LeaderboardFiltersBar } from '@/components/leaderboards/LeaderboardFiltersBar';
|
||||
import { LeaderboardTable } from '@/components/leaderboards/LeaderboardTable';
|
||||
import { RankingsPodium } from '@/components/leaderboards/RankingsPodium';
|
||||
import type { DriverRankingsViewData } from '@/lib/view-data/DriverRankingsViewData';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { PageHeader } from '@/ui/PageHeader';
|
||||
import { ChevronLeft, Trophy } from 'lucide-react';
|
||||
import React from 'react';
|
||||
|
||||
interface DriverRankingsTemplateProps {
|
||||
viewData: DriverRankingsViewData;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { DriverCard } from '@/components/drivers/DriverCard';
|
||||
import { DriverGrid } from '@/components/drivers/DriverGrid';
|
||||
@@ -9,6 +9,7 @@ import { EmptyState } from '@/ui/EmptyState';
|
||||
import { Input } from '@/ui/Input';
|
||||
import { PageHeader } from '@/ui/PageHeader';
|
||||
import { Section } from '@/ui/Section';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Search, Users } from 'lucide-react';
|
||||
|
||||
interface DriversTemplateProps {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { CtaSection } from '@/components/home/CtaSection';
|
||||
import { Hero } from '@/components/home/Hero';
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
'use client';
|
||||
|
||||
import { InlineNotice } from '@/ui/InlineNotice';
|
||||
|
||||
import type { LeagueAdminScheduleViewData } from '@/lib/view-data/LeagueAdminScheduleViewData';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Card } from '@/ui/Card';
|
||||
import { Heading } from '@/ui/Heading';
|
||||
import { Input } from '@/ui/Input';
|
||||
import { Grid } from '@/ui/Grid';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Heading } from '@/ui/Heading';
|
||||
import { InlineNotice } from '@/ui/InlineNotice';
|
||||
import { Input } from '@/ui/Input';
|
||||
import { Select } from '@/ui/Select';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Surface } from '@/ui/Surface';
|
||||
import { Text } from '@/ui/Text';
|
||||
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
'use client';
|
||||
|
||||
import { usePathname } from 'next/navigation';
|
||||
import { LeagueCard } from '@/components/leagues/LeagueCardWrapper';
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
import type { LeagueDetailViewData } from '@/lib/view-data/LeagueDetailViewData';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Link } from '@/ui/Link';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { Link } from '@/ui/Link';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { ChevronRight } from 'lucide-react';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
import { usePathname } from 'next/navigation';
|
||||
|
||||
export function LeagueDetailTemplate({ viewData, children, tabs }: TemplateProps<LeagueDetailViewData> & { children?: React.ReactNode, tabs?: any[] }) {
|
||||
const pathname = usePathname();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { AdminQuickViewWidgets } from '@/components/leagues/AdminQuickViewWidgets';
|
||||
import { LeagueActivityFeed } from '@/components/leagues/LeagueActivityFeed';
|
||||
@@ -7,9 +7,9 @@ import { NextRaceCountdownWidget } from '@/components/leagues/NextRaceCountdownW
|
||||
import { SeasonProgressWidget } from '@/components/leagues/SeasonProgressWidget';
|
||||
import type { LeagueDetailViewData } from '@/lib/view-data/LeagueDetailViewData';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Link } from '@/ui/Link';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Link } from '@/ui/Link';
|
||||
import { Calendar, Shield, Trophy, Users, type LucideIcon } from 'lucide-react';
|
||||
|
||||
interface LeagueOverviewTemplateProps {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { RulebookTabs, type RulebookSection } from '@/components/leagues/RulebookTabs';
|
||||
import { PointsTable } from '@/components/races/PointsTable';
|
||||
import type { LeagueRulebookViewData } from '@/lib/view-data/LeagueRulebookViewData';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Grid } from '@/ui/Grid';
|
||||
import { Heading } from '@/ui/Heading';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { Grid } from '@/ui/Grid';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Surface } from '@/ui/Surface';
|
||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/ui/Table';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use client';
|
||||
|
||||
import {
|
||||
navigateToEditRaceAction,
|
||||
navigateToRaceResultsAction,
|
||||
@@ -48,7 +46,7 @@ export function LeagueScheduleTemplate({
|
||||
car: race.car,
|
||||
sessionType: race.sessionType,
|
||||
scheduledAt: race.scheduledAt,
|
||||
status: race.status,
|
||||
status: race.status as 'scheduled' | 'completed',
|
||||
strengthOfField: race.strengthOfField,
|
||||
isUserRegistered: race.isUserRegistered,
|
||||
canRegister: race.canRegister,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import type { LeagueSettingsViewData } from '@/lib/view-data/LeagueSettingsViewData';
|
||||
import { Box } from '@/ui/Box';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { LeagueDecalPlacementEditor } from '@/components/leagues/LeagueDecalPlacementEditor';
|
||||
import { SponsorshipRequestCard } from '@/components/leagues/SponsorshipRequestCard';
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
'use client';
|
||||
|
||||
import { useState } from 'react';
|
||||
|
||||
import { LeagueStandingsTable } from '@/components/leagues/LeagueStandingsTable';
|
||||
import type { LeagueStandingsViewData } from '@/lib/view-data/LeagueStandingsViewData';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Group } from '@/ui/Group';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Group } from '@/ui/Group';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { Surface } from '@/ui/Surface';
|
||||
import { Trophy, Users, Calendar, Award } from 'lucide-react';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Award, Calendar, Trophy, Users } from 'lucide-react';
|
||||
import { useState } from 'react';
|
||||
|
||||
interface LeagueStandingsTemplateProps {
|
||||
viewData: LeagueStandingsViewData;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { WalletSummaryPanel } from '@/components/leagues/WalletSummaryPanel';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
|
||||
@@ -1,35 +1,33 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { LeagueCard } from '@/components/leagues/LeagueCardWrapper';
|
||||
import type { LeaguesViewData } from '@/lib/view-data/LeaguesViewData';
|
||||
import { CategoryId, LeagueCategory } from '@/lib/config/leagueCategories';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
import { LeaguesViewData } from '@/lib/view-data/LeaguesViewData';
|
||||
import { LeagueSummaryViewModel } from '@/lib/view-models/LeagueSummaryViewModel';
|
||||
import { LEAGUE_CATEGORIES, CategoryId, LeagueCategory } from '@/lib/config/leagueCategories';
|
||||
import { PageHeader } from '@/ui/PageHeader';
|
||||
import { Heading } from '@/ui/Heading';
|
||||
import { Input } from '@/ui/Input';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Group } from '@/ui/Group';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { ControlBar } from '@/ui/ControlBar';
|
||||
import { FeatureGrid } from '@/ui/FeatureGrid';
|
||||
import { Group } from '@/ui/Group';
|
||||
import { Heading } from '@/ui/Heading';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { Input } from '@/ui/Input';
|
||||
import { MetricCard } from '@/ui/MetricCard';
|
||||
import { PageHeader } from '@/ui/PageHeader';
|
||||
import { Section } from '@/ui/Section';
|
||||
import { SegmentedControl } from '@/ui/SegmentedControl';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Surface } from '@/ui/Surface';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { Section } from '@/ui/Section';
|
||||
import { ControlBar } from '@/ui/ControlBar';
|
||||
import { SegmentedControl } from '@/ui/SegmentedControl';
|
||||
import { MetricCard } from '@/ui/MetricCard';
|
||||
import { FeatureGrid } from '@/ui/FeatureGrid';
|
||||
import {
|
||||
Plus,
|
||||
Search,
|
||||
Trophy,
|
||||
Filter,
|
||||
Sparkles,
|
||||
type LucideIcon,
|
||||
Filter,
|
||||
Plus,
|
||||
Search,
|
||||
Sparkles,
|
||||
Trophy
|
||||
} from 'lucide-react';
|
||||
import React from 'react';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
|
||||
interface LeaguesTemplateProps extends TemplateProps<LeaguesViewData> {
|
||||
searchQuery: string;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { MediaGallery } from '@/components/media/MediaGallery';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
import { MediaViewData } from '@/lib/view-data/MediaViewData';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
|
||||
export function MediaTemplate({ viewData }: TemplateProps<MediaViewData>) {
|
||||
const { assets, categories, title, description } = viewData;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { NotFoundScreen } from '@/components/errors/NotFoundScreen';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { MembershipPanel } from '@/components/profile/MembershipPanel';
|
||||
import type { ProfileLeaguesViewData } from '@/lib/view-data/ProfileLeaguesViewData';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { LiveryGallery } from '@/components/profile/LiveryGallery';
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { UploadDropzone } from '@/components/shared/UploadDropzone';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Card } from '@/ui/Card';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Heading } from '@/ui/Heading';
|
||||
import { MediaMetaPanel, mapMediaMetadata } from '@/ui/MediaMetaPanel';
|
||||
import { MediaPreviewCard } from '@/ui/MediaPreviewCard';
|
||||
import { Text } from '@/ui/Text';
|
||||
import Link from 'next/link';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
|
||||
interface ProfileLiveryUploadTemplateProps extends TemplateProps<ViewData> {
|
||||
selectedFile: File | null;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { ConnectedAccountsPanel } from '@/components/profile/ConnectedAccountsPanel';
|
||||
import { PreferencesPanel } from '@/components/profile/PreferencesPanel';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
import { Box } from '@/ui/Box';
|
||||
@@ -6,11 +6,11 @@ import { Icon } from '@/ui/Icon';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import {
|
||||
Handshake,
|
||||
Palette,
|
||||
Settings,
|
||||
Trophy,
|
||||
User
|
||||
Handshake,
|
||||
Palette,
|
||||
Settings,
|
||||
Trophy,
|
||||
User
|
||||
} from 'lucide-react';
|
||||
import Link from 'next/link';
|
||||
import { usePathname } from 'next/navigation';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { AchievementGrid } from '@/components/achievements/AchievementGrid';
|
||||
import { CreateDriverForm } from '@/components/drivers/CreateDriverForm';
|
||||
|
||||
@@ -1,42 +1,35 @@
|
||||
'use client';
|
||||
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { Card } from '@/ui/Card';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Heading } from '@/ui/Heading';
|
||||
import { Link as UILink } from '@/ui/Link';
|
||||
import { Grid } from '@/ui/Grid';
|
||||
import { GridItem } from '@/ui/GridItem';
|
||||
import {
|
||||
AlertCircle,
|
||||
AlertTriangle,
|
||||
ArrowLeft,
|
||||
Calendar,
|
||||
CheckCircle,
|
||||
ChevronDown,
|
||||
Clock,
|
||||
ExternalLink,
|
||||
Flag,
|
||||
Gavel,
|
||||
Grid3x3,
|
||||
MapPin,
|
||||
MessageCircle,
|
||||
Send,
|
||||
Shield,
|
||||
ShieldAlert,
|
||||
TrendingDown,
|
||||
User,
|
||||
Video,
|
||||
XCircle,
|
||||
type LucideIcon
|
||||
} from 'lucide-react';
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Card } from '@/ui/Card';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Grid } from '@/ui/Grid';
|
||||
import { GridItem } from '@/ui/GridItem';
|
||||
import { Heading } from '@/ui/Heading';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { Link as UILink } from '@/ui/Link';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import {
|
||||
AlertCircle,
|
||||
AlertTriangle,
|
||||
ArrowLeft,
|
||||
CheckCircle,
|
||||
ChevronDown,
|
||||
ExternalLink,
|
||||
Flag,
|
||||
Gavel,
|
||||
MapPin,
|
||||
MessageCircle,
|
||||
Send,
|
||||
User,
|
||||
Video,
|
||||
XCircle
|
||||
} from 'lucide-react';
|
||||
|
||||
interface ProtestDetailTemplateProps extends TemplateProps<ViewData> {
|
||||
protestDetail: any;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { LeagueSummaryCard } from '@/components/leagues/LeagueSummaryCardWrapper';
|
||||
import { EntrantsTable } from '@/components/races/EntrantsTable';
|
||||
@@ -7,6 +7,7 @@ import { RaceDetailsHeader } from '@/components/races/RaceDetailsHeader';
|
||||
import { RaceUserResult } from '@/components/races/RaceUserResultWrapper';
|
||||
import type { SessionStatus } from '@/components/races/SessionStatusBadge';
|
||||
import { TrackConditionsPanel } from '@/components/races/TrackConditionsPanel';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Grid } from '@/ui/Grid';
|
||||
@@ -14,7 +15,6 @@ import { GridItem } from '@/ui/GridItem';
|
||||
import { Skeleton } from '@/ui/Skeleton';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
|
||||
export interface RaceDetailEntryViewModel {
|
||||
id: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { RaceDetailsHeader } from '@/components/races/RaceDetailsHeader';
|
||||
import { RaceResultsTable } from '@/components/races/RaceResultsTable';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { ProtestCard } from '@/components/leagues/ProtestCardWrapper';
|
||||
import { StewardingTabs } from '@/components/leagues/StewardingTabs';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { RaceFilterModal } from '@/components/races/RaceFilterModal';
|
||||
import { RacePageHeader } from '@/components/races/RacePageHeader';
|
||||
@@ -6,11 +6,11 @@ import { RaceScheduleTable } from '@/components/races/RaceScheduleTable';
|
||||
import { RacesAllLayout, RacesAllStats } from '@/components/races/RacesAllLayout';
|
||||
import { RaceScheduleSection } from '@/components/races/RacesLayout';
|
||||
import type { SessionStatus } from '@/components/races/SessionStatusBadge';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
import type { RacesViewData } from '@/lib/view-data/RacesViewData';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Pagination } from '@/ui/Pagination';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
|
||||
export type StatusFilter = 'scheduled' | 'running' | 'completed' | 'cancelled' | 'all';
|
||||
|
||||
@@ -44,10 +44,8 @@ export function RacesAllTemplate({
|
||||
viewData,
|
||||
races,
|
||||
totalFilteredCount,
|
||||
isLoading,
|
||||
currentPage,
|
||||
totalPages,
|
||||
itemsPerPage,
|
||||
onPageChange,
|
||||
statusFilter,
|
||||
setStatusFilter,
|
||||
|
||||
@@ -1,18 +1,15 @@
|
||||
'use client';
|
||||
|
||||
import React from 'react';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Section } from '@/ui/Section';
|
||||
import { RacesLiveRail } from '@/components/races/RacesLiveRail';
|
||||
import { RacesCommandBar } from '@/components/races/RacesCommandBar';
|
||||
|
||||
import { NextUpRacePanel } from '@/components/races/NextUpRacePanel';
|
||||
import { RacesCommandBar } from '@/components/races/RacesCommandBar';
|
||||
import { RacesDayGroup } from '@/components/races/RacesDayGroup';
|
||||
import { RacesEmptyState } from '@/components/races/RacesEmptyState';
|
||||
import { RaceFilterModal } from '@/components/races/RaceFilterModal';
|
||||
import { RacesLiveRail } from '@/components/races/RacesLiveRail';
|
||||
import type { RacesViewData, RaceViewData } from '@/lib/view-data/RacesViewData';
|
||||
import { PageHeader } from '@/ui/PageHeader';
|
||||
import { Section } from '@/ui/Section';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Flag } from 'lucide-react';
|
||||
import type { RacesViewData, RaceViewData } from '@/lib/view-data/RacesViewData';
|
||||
|
||||
export interface RacesIndexTemplateProps {
|
||||
viewData: RacesViewData & {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { LiveRacesBanner } from '@/components/races/LiveRacesBanner';
|
||||
import { RaceFilterBar } from '@/components/races/RaceFilterBar';
|
||||
@@ -12,7 +12,6 @@ import { Container } from '@/ui/Container';
|
||||
import { Grid } from '@/ui/Grid';
|
||||
import { GridItem } from '@/ui/GridItem';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import React from 'react';
|
||||
|
||||
export type TimeFilter = 'all' | 'upcoming' | 'live' | 'past';
|
||||
export type RaceStatusFilter = 'scheduled' | 'running' | 'completed' | 'cancelled' | 'all';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import type { MembershipRole } from '@/lib/types/MembershipRole';
|
||||
import type { LeagueRosterAdminViewData } from '@/lib/view-data/LeagueRosterAdminViewData';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { RulebookTabs, type RulebookSection } from '@/components/leagues/RulebookTabs';
|
||||
import { PointsTable } from '@/components/races/PointsTable';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { ErrorDetails } from '@/components/errors/ErrorDetails';
|
||||
import { RecoveryActions } from '@/components/errors/RecoveryActions';
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { BillingSummaryPanel } from '@/components/sponsors/BillingSummaryPanel';
|
||||
import { SponsorDashboardHeader } from '@/components/sponsors/SponsorDashboardHeader';
|
||||
import { PayoutItem, SponsorPayoutQueueTable } from '@/components/sponsors/SponsorPayoutQueueTable';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
import { siteConfig } from '@/lib/siteConfig';
|
||||
import type { InvoiceDTO, PaymentMethodDTO } from '@/lib/types/tbd/SponsorBillingDTO';
|
||||
import { Box } from '@/ui/Box';
|
||||
@@ -14,7 +15,6 @@ import { Icon } from '@/ui/Icon';
|
||||
import { InfoBanner } from '@/ui/InfoBanner';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
import {
|
||||
Building2,
|
||||
CreditCard,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { BillingSummaryPanel } from '@/components/sponsors/BillingSummaryPanel';
|
||||
import { MetricCard } from '@/components/sponsors/MetricCard';
|
||||
@@ -13,26 +13,26 @@ import { Box } from '@/ui/Box';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Card } from '@/ui/Card';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Grid } from '@/ui/Grid';
|
||||
import { Heading } from '@/ui/Heading';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { Link } from '@/ui/Link';
|
||||
import { Grid } from '@/ui/Grid';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import {
|
||||
Bell,
|
||||
Car,
|
||||
ChevronRight,
|
||||
Clock,
|
||||
DollarSign,
|
||||
Eye,
|
||||
Flag,
|
||||
LucideIcon,
|
||||
Megaphone,
|
||||
Plus,
|
||||
TrendingUp,
|
||||
Trophy,
|
||||
Users
|
||||
Bell,
|
||||
Car,
|
||||
ChevronRight,
|
||||
Clock,
|
||||
DollarSign,
|
||||
Eye,
|
||||
Flag,
|
||||
LucideIcon,
|
||||
Megaphone,
|
||||
Plus,
|
||||
TrendingUp,
|
||||
Trophy,
|
||||
Users
|
||||
} from 'lucide-react';
|
||||
|
||||
interface SponsorDashboardTemplateProps {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { BillingSummaryPanel } from '@/components/sponsors/BillingSummaryPanel';
|
||||
import { PricingTableShell, PricingTier } from '@/components/sponsors/PricingTableShell';
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { AvailableLeagueCard } from '@/components/sponsors/AvailableLeagueCard';
|
||||
import { SponsorDashboardHeader } from '@/components/sponsors/SponsorDashboardHeader';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
import { routes } from '@/lib/routing/RouteConfig';
|
||||
import { siteConfig } from '@/lib/siteConfig';
|
||||
import { Box } from '@/ui/Box';
|
||||
@@ -17,7 +18,6 @@ import { Link } from '@/ui/Link';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Surface } from '@/ui/Surface';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
import {
|
||||
Car,
|
||||
Megaphone,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { SponsorshipRequestsPanel } from '@/components/profile/SponsorshipRequestsPanel';
|
||||
import type { SponsorshipRequestsViewData } from '@/lib/view-data/SponsorshipRequestsViewData';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { PenaltyHistoryList } from '@/components/leagues/PenaltyHistoryList';
|
||||
import { QuickPenaltyModal } from '@/components/leagues/QuickPenaltyModal';
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
'use client';
|
||||
|
||||
import React from 'react';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Heading } from '@/ui/Heading';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Grid } from '@/ui/Grid';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Panel } from '@/ui/Panel';
|
||||
import { Breadcrumbs } from '@/ui/Breadcrumbs';
|
||||
import { TeamDetailsHeader } from '@/components/teams/TeamDetailsHeader';
|
||||
|
||||
import { TeamAdmin } from '@/components/teams/TeamAdmin';
|
||||
import { TeamMembersTable } from '@/components/teams/TeamMembersTable';
|
||||
import { TeamStandingsPanel } from '@/components/teams/TeamStandingsPanel';
|
||||
import { TeamAdmin } from '@/components/teams/TeamAdmin';
|
||||
import type { TeamDetailViewData } from '@/lib/view-data/TeamDetailViewData';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Breadcrumbs } from '@/ui/Breadcrumbs';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Grid } from '@/ui/Grid';
|
||||
import { Heading } from '@/ui/Heading';
|
||||
import { Panel } from '@/ui/Panel';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
|
||||
type Tab = 'overview' | 'roster' | 'standings' | 'admin';
|
||||
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { LeaderboardFiltersBar } from '@/components/leaderboards/LeaderboardFiltersBar';
|
||||
import type { SkillLevel, SortBy } from '@/lib/view-data/TeamLeaderboardViewData';
|
||||
import type { TeamSummaryViewModel } from '@/lib/view-models/TeamSummaryViewModel';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Heading } from '@/ui/Heading';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { Group } from '@/ui/Group';
|
||||
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/ui/Table';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Panel } from '@/ui/Panel';
|
||||
import { Section } from '@/ui/Section';
|
||||
import { Select } from '@/ui/Select';
|
||||
import { Table, TableBody, TableCell, TableHead, TableRow } from '@/ui/Table';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { Award, ChevronLeft, Users } from 'lucide-react';
|
||||
import React from 'react';
|
||||
|
||||
interface TeamLeaderboardTemplateProps {
|
||||
viewData: {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
'use client';
|
||||
|
||||
import React from 'react';
|
||||
import { Users, ChevronLeft } from 'lucide-react';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { PageHeader } from '@/ui/PageHeader';
|
||||
import { TeamLeaderboardTable } from '@/components/leaderboards/TeamLeaderboardTable';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
|
||||
import { LeaderboardFiltersBar } from '@/components/leaderboards/LeaderboardFiltersBar';
|
||||
import { TeamLeaderboardTable } from '@/components/leaderboards/TeamLeaderboardTable';
|
||||
import type { TeamRankingsViewData } from '@/lib/view-data/TeamRankingsViewData';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Icon } from '@/ui/Icon';
|
||||
import { PageHeader } from '@/ui/PageHeader';
|
||||
import { ChevronLeft, Users } from 'lucide-react';
|
||||
import React from 'react';
|
||||
|
||||
interface TeamRankingsTemplateProps {
|
||||
viewData: TeamRankingsViewData;
|
||||
|
||||
@@ -1,20 +1,16 @@
|
||||
'use client';
|
||||
|
||||
import React, { useMemo } from 'react';
|
||||
import { Users } from 'lucide-react';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
import { TeamsViewData, TeamSummaryData } from '@/lib/view-data/TeamsViewData';
|
||||
import { TeamsDirectoryHeader } from '@/components/teams/TeamsDirectoryHeader';
|
||||
import { TeamGrid } from '@/components/teams/TeamGrid';
|
||||
|
||||
import { Carousel } from '@/components/shared/Carousel';
|
||||
import { TeamCard } from '@/components/teams/TeamCard';
|
||||
import { TeamSearchBar } from '@/components/teams/TeamSearchBar';
|
||||
import { PageHeader } from '@/ui/PageHeader';
|
||||
import { TeamsViewData } from '@/lib/view-data/TeamsViewData';
|
||||
import { Button } from '@/ui/Button';
|
||||
import { EmptyState } from '@/ui/EmptyState';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { PageHeader } from '@/ui/PageHeader';
|
||||
import { Section } from '@/ui/Section';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Carousel } from '@/components/shared/Carousel';
|
||||
import { Users } from 'lucide-react';
|
||||
import { useMemo } from 'react';
|
||||
|
||||
interface TeamsTemplateProps extends TemplateProps<TeamsViewData> {
|
||||
searchQuery: string;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { ActionFiltersBar } from '@/components/actions/ActionFiltersBar';
|
||||
import { ActionList } from '@/components/actions/ActionList';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { AuthCard } from '@/components/auth/AuthCard';
|
||||
import { AuthFooterLinks } from '@/components/auth/AuthFooterLinks';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { AuthLoading } from '@/components/auth/AuthLoading';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
|
||||
export function LoginLoadingTemplate({ viewData }: TemplateProps<ViewData>) {
|
||||
export function LoginLoadingTemplate({ }: TemplateProps<ViewData>) {
|
||||
return <AuthLoading />;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { AuthCard } from '@/components/auth/AuthCard';
|
||||
import { AuthFooterLinks } from '@/components/auth/AuthFooterLinks';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { AuthCard } from '@/components/auth/AuthCard';
|
||||
import { AuthFooterLinks } from '@/components/auth/AuthFooterLinks';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { AuthCard } from '@/components/auth/AuthCard';
|
||||
import { AuthFooterLinks } from '@/components/auth/AuthFooterLinks';
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { DashboardRail } from '@/components/dashboard/DashboardRail';
|
||||
import { AuthedNav } from '@/components/layout/AuthedNav';
|
||||
import { PublicNav } from '@/components/layout/PublicNav';
|
||||
import { useCurrentSession } from '@/hooks/auth/useCurrentSession';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Surface } from '@/ui/Surface';
|
||||
import { Text } from '@/ui/Text';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { AppFooter } from '@/components/layout/AppFooter';
|
||||
import { AppHeader } from '@/components/layout/AppHeader';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { AvatarInfo, AvatarStep } from '@/components/onboarding/AvatarStep';
|
||||
import { OnboardingError } from '@/components/onboarding/OnboardingError';
|
||||
@@ -8,11 +8,11 @@ import { OnboardingShell } from '@/components/onboarding/OnboardingShell';
|
||||
import { OnboardingStepPanel } from '@/components/onboarding/OnboardingStepPanel';
|
||||
import { OnboardingStepper } from '@/components/onboarding/OnboardingStepper';
|
||||
import { PersonalInfo, PersonalInfoStep } from '@/components/onboarding/PersonalInfoStep';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
import { Box } from '@/ui/Box';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { FormEvent } from 'react';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
|
||||
type OnboardingStep = 1 | 2;
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
'use client';
|
||||
|
||||
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
import { Container } from '@/ui/Container';
|
||||
import { Stack } from '@/ui/Stack';
|
||||
import { Text } from '@/ui/Text';
|
||||
import { TemplateProps } from '@/lib/contracts/components/ComponentContracts';
|
||||
import { ViewData } from '@/lib/contracts/view-data/ViewData';
|
||||
|
||||
interface ErrorTemplateProps extends TemplateProps<ViewData> {
|
||||
message?: string;
|
||||
|
||||
Reference in New Issue
Block a user