diff --git a/src/components/media/MediaCard.tsx b/src/components/media/MediaCard.tsx
index 427ccfe2..30a61476 100644
--- a/src/components/media/MediaCard.tsx
+++ b/src/components/media/MediaCard.tsx
@@ -201,15 +201,12 @@ export function MediaCard(props: MediaCardProps) {
if (!canLink) return {content};
return (
-
{content}
-
+
);
}
diff --git a/src/components/media/PopupModal.tsx b/src/components/media/PopupModal.tsx
new file mode 100644
index 00000000..6615a7a2
--- /dev/null
+++ b/src/components/media/PopupModal.tsx
@@ -0,0 +1,17 @@
+import React from 'react';
+
+interface PopupModalProps {
+ isVisible: boolean;
+ onClose: () => void;
+}
+
+
+export function PopupModal({ isVisible, onClose }: PopupModalProps) {
+ if (!isVisible) return null;
+
+ return (
+
+
+
+ );
+}
diff --git a/src/components/media/WatchedMediaCard.tsx b/src/components/media/WatchedMediaCard.tsx
index 3bd2bdad..60840ee3 100644
--- a/src/components/media/WatchedMediaCard.tsx
+++ b/src/components/media/WatchedMediaCard.tsx
@@ -1,4 +1,4 @@
-import { useCallback, useMemo } from "react";
+import { useCallback, useMemo, useState } from "react";
import { usePlayerStore } from "@/stores/player/store";
import { useProgressStore } from "@/stores/progress";
@@ -7,6 +7,7 @@ import {
shouldShowProgress,
} from "@/stores/progress/utils";
import { MediaItem } from "@/utils/mediaTypes";
+import { PopupModal } from "./PopupModal";
import { MediaCard } from "./MediaCard";
@@ -38,11 +39,12 @@ export function WatchedMediaCard(props: WatchedMediaCardProps) {
const percentage = itemToDisplay?.show
? (itemToDisplay.progress.watched / itemToDisplay.progress.duration) * 100
: undefined;
-
const setPlayingTitle = usePlayerStore((state) => state.setPlayingTitle);
+ const [isPopupVisible, setIsPopupVisible] = useState(false);
const handleClick = useCallback(() => {
setPlayingTitle(props.media.id, props.media.title, props.media.type);
+ setIsPopupVisible(!isPopupVisible);
console.log(
usePlayerStore.getState().playingTitle.title,
usePlayerStore.getState().playingTitle.id,
@@ -50,15 +52,19 @@ export function WatchedMediaCard(props: WatchedMediaCardProps) {
);
}, [setPlayingTitle, props.media.id, props.media.title, props.media.type]);
+
return (
-
+ <>
+
+ setIsPopupVisible(false)} />
+ >
);
}