wip
This commit is contained in:
@@ -12,12 +12,12 @@ import {
|
||||
ChevronRight,
|
||||
Sparkles,
|
||||
} from 'lucide-react';
|
||||
import type { LeagueSummaryDTO } from '@gridpilot/racing/application/dto/LeagueSummaryDTO';
|
||||
import type { LeagueSummaryViewModel } from '@gridpilot/racing/application/presenters/IAllLeaguesWithCapacityAndScoringPresenter';
|
||||
import { getLeagueCoverClasses } from '@/lib/leagueCovers';
|
||||
import { getImageService } from '@/lib/di-container';
|
||||
|
||||
interface LeagueCardProps {
|
||||
league: LeagueSummaryDTO;
|
||||
league: LeagueSummaryViewModel;
|
||||
onClick?: () => void;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ function getGameColor(gameId?: string): string {
|
||||
}
|
||||
}
|
||||
|
||||
function isNewLeague(createdAt: Date): boolean {
|
||||
function isNewLeague(createdAt: string | Date): boolean {
|
||||
const oneWeekAgo = new Date();
|
||||
oneWeekAgo.setDate(oneWeekAgo.getDate() - 7);
|
||||
return new Date(createdAt) > oneWeekAgo;
|
||||
|
||||
Reference in New Issue
Block a user