feat: make author clickable
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Handlers, PageProps } from "$fresh/server.ts";
|
||||
import { MainLayout } from "@components/layouts/main.tsx";
|
||||
import { getAllMovies, Movie } from "@lib/resource/movies.ts";
|
||||
import { MovieCard } from "@components/MovieCard.tsx";
|
||||
import { ResourceCard } from "@components/Card.tsx";
|
||||
import { Grid } from "@components/Grid.tsx";
|
||||
import { IconArrowLeft } from "@components/icons.tsx";
|
||||
import { KMenu } from "@islands/KMenu.tsx";
|
||||
@@ -9,7 +9,9 @@ import { RedirectSearchHandler } from "@islands/Search.tsx";
|
||||
import { parseResourceUrl, searchResource } from "@lib/search.ts";
|
||||
import { SearchResult } from "@lib/types.ts";
|
||||
|
||||
export const handler: Handlers<Movie[] | null> = {
|
||||
export const handler: Handlers<
|
||||
{ movies: Movie[] | null; searchResults?: SearchResult }
|
||||
> = {
|
||||
async GET(req, ctx) {
|
||||
const movies = await getAllMovies();
|
||||
const searchParams = parseResourceUrl(req.url);
|
||||
@@ -46,7 +48,7 @@ export default function Greet(
|
||||
</header>
|
||||
<Grid>
|
||||
{movies?.map((doc) => {
|
||||
return <MovieCard movie={doc} />;
|
||||
return <ResourceCard res={doc} />;
|
||||
})}
|
||||
</Grid>
|
||||
</MainLayout>
|
||||
|
||||
Reference in New Issue
Block a user