Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
k2xl committed Dec 9, 2023
1 parent 9b4372c commit 2614c30
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion helpers/getGameLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import Image from 'next/image';
import React from 'react';
import { getGameFromId } from './getGameIdFromReq';

export function getGameLogo(gameId: GameId, id: string) {
export function getGameLogo(gameId: GameId, id?: string) {
if (!id) {
// gen random
id = Math.random().toString(36).substring(7);

Check warning on line 10 in helpers/getGameLogo.tsx

View check run for this annotation

Codecov / codecov/patch

helpers/getGameLogo.tsx#L10

Added line #L10 was not covered by tests
}

const game = getGameFromId(gameId);
const logo = game.logo;
const tooltipId = `${game.id}-tip-${id}`;

Check warning on line 15 in helpers/getGameLogo.tsx

View check run for this annotation

Codecov / codecov/patch

helpers/getGameLogo.tsx#L13-L15

Added lines #L13 - L15 were not covered by tests
Expand Down

0 comments on commit 2614c30

Please sign in to comment.