Skip to content

Commit 4bb29b2

Browse files
author
belledw
committed
Removed GetGameCoverUrl function from MemberProjectSection
1 parent b39b6bc commit 4bb29b2

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

client/src/components/ui/MemberProjectSection.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,6 @@ type MemberProjectSectionProps = {
99
id: string;
1010
};
1111

12-
// From useGamesShowcase
13-
function getGameCoverUrl(
14-
game_cover_thumbnail: string | null | undefined,
15-
): string {
16-
if (!game_cover_thumbnail) return "/game_dev_club_logo.svg";
17-
if (game_cover_thumbnail.startsWith("http")) return game_cover_thumbnail;
18-
// Use environment variable for Django backend base URL
19-
const apiBaseUrl =
20-
process.env.NEXT_PUBLIC_API_BASE_URL || "http://localhost:8000";
21-
return `${apiBaseUrl}${game_cover_thumbnail}`;
22-
}
23-
2412
export default function MemberProjectSection(props: MemberProjectSectionProps) {
2513
const { data: games, isError, error } = useContributor(props.id);
2614

@@ -57,7 +45,7 @@ export default function MemberProjectSection(props: MemberProjectSectionProps) {
5745
<div className="w-fit rounded-md p-5">
5846
<div className="group mb-2 grid h-44 w-96 grid-cols-1 grid-rows-1 overflow-clip rounded-md">
5947
<Image
60-
src={getGameCoverUrl(game.game_data.thumbnail)}
48+
src={game.game_data.thumbnail}
6149
alt={`${game.game_data.name} cover image`}
6250
width={384}
6351
height={176}

0 commit comments

Comments
 (0)