refactor: remove some duplicated code

This commit is contained in:
2023-08-01 17:50:00 +02:00
parent 01697a6686
commit c5cf629482
30 changed files with 377 additions and 321 deletions

View File

@ -1,5 +1,3 @@
import { Recipe } from "../lib/recipes.ts";
export function Card(
{ link, title, image }: { link?: string; title?: string; image?: string },
) {

View File

@ -1,5 +1,5 @@
import { Card } from "@components/Card.tsx";
import { Movie } from "@lib/movies.ts";
import { Movie } from "@lib/resource/movies.ts";
export function MovieCard({ movie }: { movie: Movie }) {
const { meta: { image = "/placeholder.svg" } = {} } = movie;

View File

@ -1,5 +1,5 @@
import { Card } from "@components/Card.tsx";
import { Recipe } from "@lib/recipes.ts";
import { Recipe } from "@lib/resource/recipes.ts";
export function RecipeCard({ recipe }: { recipe: Recipe }) {
const { meta: { image = "/placeholder.svg" } = {} } = recipe;

View File

@ -1,5 +1,3 @@
import { Recipe } from "@lib/recipes.ts";
import IconExternalLink from "https://deno.land/x/tabler_icons_tsx@0.0.3/tsx/external-link.tsx";
import { Star } from "@components/Stars.tsx";
export function RecipeHero(