From 255b1d6b9a518ce3711a8b012218aef6a35f6bb1 Mon Sep 17 00:00:00 2001 From: KennyG Date: Mon, 4 May 2026 10:56:25 -0400 Subject: [PATCH] Cleanup PerformerPopover to remove old loading state - Eliminated the PerformerPreviewCard component, simplifying the PerformerPopoverCard structure. - Updated loading state logic to directly display loading text without relying on preview data. - Removed unused props related to performer preview data for cleaner code and improved maintainability. --- .../Performers/PerformerPopover.tsx | 21 ++----- .../Performers/PerformerPreviewCard.tsx | 55 ------------------- 2 files changed, 4 insertions(+), 72 deletions(-) delete mode 100644 ui/v2.5/src/components/Performers/PerformerPreviewCard.tsx diff --git a/ui/v2.5/src/components/Performers/PerformerPopover.tsx b/ui/v2.5/src/components/Performers/PerformerPopover.tsx index b28f73e9f..70052686b 100644 --- a/ui/v2.5/src/components/Performers/PerformerPopover.tsx +++ b/ui/v2.5/src/components/Performers/PerformerPopover.tsx @@ -6,15 +6,10 @@ import { useFindPerformer } from "../../core/StashService"; import { useConfigurationContext } from "../../hooks/Config"; import { Placement } from "react-bootstrap/esm/Overlay"; import { PerformerCard } from "./PerformerCard"; -import { - IPerformerPreviewData, - PerformerPreviewCard, -} from "./PerformerPreviewCard"; interface IPeromerPopoverCardProps { id?: string; cardContent?: React.ReactNode; - previewData?: IPerformerPreviewData; loading?: boolean; loadingText?: string; cardExtras?: React.ReactNode; @@ -51,7 +46,6 @@ const PerformerPopoverCardByID: React.FC<{ export const PerformerPopoverCard: React.FC = ({ id, cardContent, - previewData, loading, loadingText = "", cardExtras, @@ -65,16 +59,12 @@ export const PerformerPopoverCard: React.FC = ({ ); } - if (previewData || loading) { + if (loading) { return ( <> - {previewData ? ( - - ) : ( -
- {loading ? loadingText : null} -
- )} +
+ {loadingText} +
{cardExtras} ); @@ -87,7 +77,6 @@ export const PerformerPopoverCard: React.FC = ({ interface IPeroformerPopoverProps { id?: string; cardContent?: React.ReactNode; - previewData?: IPerformerPreviewData; loading?: boolean; loadingText?: string; cardExtras?: React.ReactNode; @@ -104,7 +93,6 @@ interface IPeroformerPopoverProps { export const PerformerPopover: React.FC = ({ id, cardContent, - previewData, loading, loadingText, cardExtras, @@ -139,7 +127,6 @@ export const PerformerPopover: React.FC = ({ ; - disambiguation?: string | null; - ageString?: string | null; -} - -export const PerformerPreviewCard = ({ - name, - image, - country, - gender, - disambiguation, - ageString, -}: IPerformerPreviewData) => ( -
-
-
- {name} - {country && ( - - )} -
-
-
- - {name} - {disambiguation && ( - - {` (${disambiguation})`} - - )} -
- {ageString ? ( -
{ageString}
- ) : null} -
-
-
-);