feat: correctly cache images with redis
This commit is contained in:
@ -3,7 +3,7 @@ import { RecipeCard } from "@components/RecipeCard.tsx";
|
||||
import { MainLayout } from "@components/layouts/main.tsx";
|
||||
import { Recipe } from "@lib/recipes.ts";
|
||||
import { getRecipes } from "../api/recipes/index.ts";
|
||||
|
||||
import IconArrowLeft from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/arrow-left.tsx";
|
||||
export const handler: Handlers<Recipe[] | null> = {
|
||||
async GET(_, ctx) {
|
||||
const recipes = await getRecipes();
|
||||
@ -14,6 +14,17 @@ export const handler: Handlers<Recipe[] | null> = {
|
||||
export default function Greet(props: PageProps<Recipe[] | null>) {
|
||||
return (
|
||||
<MainLayout>
|
||||
<header class="flex gap-4 items-center mb-5">
|
||||
<a
|
||||
class="px-4 ml-4 py-2 bg-gray-300 text-gray-800 rounded-lg flex items-center gap-1"
|
||||
href="/"
|
||||
>
|
||||
<IconArrowLeft class="w-5 h-5" />
|
||||
Back
|
||||
</a>
|
||||
|
||||
<h3 class="text-2xl text-white font-light">Recipes</h3>
|
||||
</header>
|
||||
<div class="flex flex-wrap justify-center items-center gap-4 px-4">
|
||||
{props.data?.map((doc) => {
|
||||
return <RecipeCard recipe={doc} />;
|
||||
|
Reference in New Issue
Block a user