mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2026-01-04 21:58:39 -05:00
feat: Option on item's page to add/remove from watchlist (#781)
* feat: adds button on the page of a media item to add or remove it from a user's watchlist re #730 * fix: whitespace and i18n key * style: fix code format to the required standards * refactor: change axios for the fetch api --------- Co-authored-by: JoaquinOlivero <joaquin.olivero@hotmail.com>
This commit is contained in:
@@ -85,6 +85,7 @@ export interface MovieDetails {
|
||||
mediaUrl?: string;
|
||||
watchProviders?: WatchProviders[];
|
||||
keywords: Keyword[];
|
||||
onUserWatchlist?: boolean;
|
||||
}
|
||||
|
||||
export const mapProductionCompany = (
|
||||
@@ -101,7 +102,8 @@ export const mapProductionCompany = (
|
||||
|
||||
export const mapMovieDetails = (
|
||||
movie: TmdbMovieDetails,
|
||||
media?: Media
|
||||
media?: Media,
|
||||
userWatchlist?: boolean
|
||||
): MovieDetails => ({
|
||||
id: movie.id,
|
||||
adult: movie.adult,
|
||||
@@ -148,4 +150,5 @@ export const mapMovieDetails = (
|
||||
id: keyword.id,
|
||||
name: keyword.name,
|
||||
})),
|
||||
onUserWatchlist: userWatchlist,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user