Skip to content

Commit

Permalink
Fix type error on games detail page
Browse files Browse the repository at this point in the history
Signed-off-by: Milan Gruner <[email protected]>
  • Loading branch information
lemilonkh committed Sep 17, 2023
1 parent a43e62f commit 159a7ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/games/[...slug].astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { getCollection, type CollectionEntry } from "astro:content";
import { Image } from "astro:assets";
import BaseLayout from "../../layouts/BaseLayout.astro";
import googlePlayBadge from "../../content/games/images/google_play_badge.png";
import type { ImageMetadata } from "astro";
interface Props {
game: CollectionEntry<'games'>;
Expand All @@ -15,7 +16,7 @@ export async function getStaticPaths() {
}));
}
function getAspectHeight(width, image) {
function getAspectHeight(width: number, image: ImageMetadata) {
return width * (image.height / image.width);
}
Expand Down

0 comments on commit 159a7ed

Please sign in to comment.