From c67a11b8b60486a79a79cd34ab8534d823a07639 Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Thu, 14 Dec 2023 14:55:31 +0100 Subject: [PATCH] Fix weird menus click via a weird hack --- front/packages/ui/src/components/context-menus.tsx | 7 +------ front/packages/ui/src/details/episode.tsx | 7 +++++-- front/packages/ui/src/details/season.tsx | 1 + front/packages/ui/src/details/show.tsx | 1 + 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/front/packages/ui/src/components/context-menus.tsx b/front/packages/ui/src/components/context-menus.tsx index 55628a9c..1363e01c 100644 --- a/front/packages/ui/src/components/context-menus.tsx +++ b/front/packages/ui/src/components/context-menus.tsx @@ -32,7 +32,7 @@ export const EpisodesContext = ({ slug, status, ...props -}: { showSlug?: string; slug: string; status: WatchStatusV | null } & Partial< +}: { showSlug?: string | null; slug: string; status: WatchStatusV | null } & Partial< ComponentProps> >) => { const account = useAccount(); @@ -50,11 +50,6 @@ export const EpisodesContext = ({ return ( - console.log("tot")} - /> {showSlug && ( )} diff --git a/front/packages/ui/src/details/episode.tsx b/front/packages/ui/src/details/episode.tsx index cbd2906d..e702693a 100644 --- a/front/packages/ui/src/details/episode.tsx +++ b/front/packages/ui/src/details/episode.tsx @@ -158,11 +158,13 @@ export const EpisodeLine = ({ runtime, watchedPercent, watchedStatus, + href, ...props }: WithLoading<{ id: string; slug: string; - showSlug: string; + // if show slug is null, disable "Go to show" in the context menu + showSlug: string | null; displayNumber: string; name: string | null; overview: string | null; @@ -174,6 +176,7 @@ export const EpisodeLine = ({ runtime: number | null; watchedPercent: number | null; watchedStatus: WatchStatusV | null; + href: string; }> & Partial) => { const [moreOpened, setMoreOpened] = useState(false); @@ -182,7 +185,7 @@ export const EpisodeLine = ({ return ( setMoreOpened(true)} {...css( { diff --git a/front/packages/ui/src/details/season.tsx b/front/packages/ui/src/details/season.tsx index d541c336..cff1dc74 100644 --- a/front/packages/ui/src/details/season.tsx +++ b/front/packages/ui/src/details/season.tsx @@ -147,6 +147,7 @@ export const EpisodeList = ({ )}