diff --git a/components/Image.tsx b/components/Image.tsx
index c965741..ffee9a1 100644
--- a/components/Image.tsx
+++ b/components/Image.tsx
@@ -1,14 +1,25 @@
-import { isLocalImage } from "@lib/string.ts";
-
-export function Image(
- props: { class: string; src: string; width?: number; height?: number },
-) {
- if (isLocalImage(props.src)) {
- }
+import * as CSS from "https://esm.sh/csstype@3.1.2";
+const Image = (
+ props: {
+ class: string;
+ src: string;
+ alt?: string;
+ width?: number | string;
+ height?: number | string;
+ style?: CSS.HtmlAttributes;
+ },
+) => {
return (
-
-

-
+
);
-}
+};
+
+export default Image;
diff --git a/components/MovieCard.tsx b/components/MovieCard.tsx
index 5e323c4..3dd8a08 100644
--- a/components/MovieCard.tsx
+++ b/components/MovieCard.tsx
@@ -1,14 +1,17 @@
import { Card } from "@components/Card.tsx";
import { Movie } from "@lib/resource/movies.ts";
import { Series } from "@lib/resource/series.ts";
+import { isLocalImage } from "@lib/string.ts";
export function MovieCard({ movie }: { movie: Movie }) {
const { meta: { image = "/placeholder.svg" } = {} } = movie;
- const imageUrl = image?.startsWith("Media/movies/")
+ const imageUrl = isLocalImage(image)
? `/api/images?image=${image}&width=200&height=200`
: image;
+ console.log({ imageUrl, image });
+
return (
{imageUrl &&
(
-
{
useEventListener("keydown", (e: KeyboardEvent) => {
@@ -30,7 +31,7 @@ const SearchResultImage = ({ src }: { src: string }) => {
: src;
return (
-
{
const [searchQuery, setSearchQuery] = useState(q);
@@ -185,4 +186,4 @@ const SearchComponent = (
);
};
-export default SearchComponent;
+export default Search;
diff --git a/routes/_404.tsx b/routes/_404.tsx
index c8228ab..253928c 100644
--- a/routes/_404.tsx
+++ b/routes/_404.tsx
@@ -1,5 +1,5 @@
-
import { Head } from "$fresh/runtime.ts";
+import Image from "@components/Image.tsx";
export default function Error404() {
return (
@@ -9,7 +9,7 @@ export default function Error404() {
-
