wip
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { faker } from '../faker/faker';
|
||||
|
||||
const DRIVER_AVATARS = [
|
||||
'/images/avatars/avatar-1.svg',
|
||||
'/images/avatars/avatar-2.svg',
|
||||
@@ -44,4 +46,20 @@ export function getLeagueBanner(leagueId: string): string {
|
||||
return LEAGUE_BANNERS[index];
|
||||
}
|
||||
|
||||
export interface LeagueCoverImage {
|
||||
url: string;
|
||||
alt: string;
|
||||
}
|
||||
|
||||
export function getLeagueCoverImage(leagueId: string): LeagueCoverImage {
|
||||
const seed = hashString(leagueId);
|
||||
|
||||
faker.seed(seed);
|
||||
const alt = faker.lorem.words(3);
|
||||
|
||||
const url = `https://picsum.photos/seed/${seed}/1200/280?blur=2`;
|
||||
|
||||
return { url, alt };
|
||||
}
|
||||
|
||||
export { DRIVER_AVATARS, TEAM_LOGOS, LEAGUE_BANNERS };
|
||||
Reference in New Issue
Block a user