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