fix: typo

This commit is contained in:
Adrian Castro
2024-03-27 14:59:44 +01:00
parent dca49e8563
commit 020cb42e38
2 changed files with 4 additions and 4 deletions

View File

@@ -142,7 +142,7 @@ interface WatchHistoryItem {
interface WatchHistoryStoreState {
watchHistory: WatchHistoryItem[];
hasWatchHistoryItem: (item: ItemData) => boolean;
getWatchHistorItem: (media: ScrapeMedia) => WatchHistoryItem | undefined;
getWatchHistoryItem: (media: ScrapeMedia) => WatchHistoryItem | undefined;
setWatchHistory: (watchHistory: WatchHistoryItem[]) => void;
updateWatchHistory: (
item: ItemData,
@@ -165,7 +165,7 @@ export const useWatchHistoryStore = create<
(historyItem) => historyItem.item.id === item.id,
),
),
getWatchHistorItem: (media: ScrapeMedia) =>
getWatchHistoryItem: (media: ScrapeMedia) =>
get().watchHistory.find((historyItem) => {
if (historyItem.media.type === "movie" && media.type === "movie") {
return historyItem.media.tmdbId === media.tmdbId;