feat: make author clickable

This commit is contained in:
2023-08-12 18:32:56 +02:00
parent d2a02fcf34
commit 2b4173d759
27 changed files with 257 additions and 174 deletions

View File

@@ -14,6 +14,7 @@ export type Movie = {
date: Date;
image: string;
thumbnail?: string;
average?: string;
author: string;
rating: number;
status: "not-seen" | "watch-again" | "finished";
@@ -99,12 +100,10 @@ export function parseMovie(original: string, id: string): Movie {
const crud = createCrud<Movie>({
prefix: "Media/movies/",
parse: parseMovie,
render: renderMovie,
hasThumbnails: true,
});
export const getMovie = crud.read;
export const getAllMovies = crud.readAll;
export const createMovie = (movie: Movie) => {
const content = renderMovie(movie);
return crud.create(movie.id, content);
};
export const createMovie = crud.create;