diff --git a/ui/v2.5/src/components/Dialogs/SubmitDraft.tsx b/ui/v2.5/src/components/Dialogs/SubmitDraft.tsx index f00e4b213..7c0364f8d 100644 --- a/ui/v2.5/src/components/Dialogs/SubmitDraft.tsx +++ b/ui/v2.5/src/components/Dialogs/SubmitDraft.tsx @@ -96,6 +96,7 @@ export const SubmitStashBoxDraft: React.FC = ({ {boxes.map((box, i) => ( diff --git a/ui/v2.5/src/components/Tagger/performers/PerformerTagger.tsx b/ui/v2.5/src/components/Tagger/performers/PerformerTagger.tsx index 97c3b329f..1436d5059 100755 --- a/ui/v2.5/src/components/Tagger/performers/PerformerTagger.tsx +++ b/ui/v2.5/src/components/Tagger/performers/PerformerTagger.tsx @@ -379,10 +379,13 @@ const PerformerTaggerList: React.FC = ({ const renderPerformers = () => performers.map((performer) => { const isTagged = taggedPerformers[performer.id]; - const hasStashIDs = performer.stash_ids.length > 0; + + const stashID = performer.stash_ids.find((s) => { + return s.endpoint === selectedEndpoint.endpoint; + }); let mainContent; - if (!isTagged && hasStashIDs) { + if (!isTagged && stashID !== undefined) { mainContent = (
@@ -390,7 +393,7 @@ const PerformerTaggerList: React.FC = ({
); - } else if (!isTagged && !hasStashIDs) { + } else if (!isTagged && !stashID) { mainContent = ( = ({ } let subContent; - if (performer.stash_ids.length > 0) { - const stashLinks = performer.stash_ids.map((stashID) => { - const base = stashID.endpoint.match(/https?:\/\/.*?\//)?.[0]; - const link = base ? ( - - {stashID.stash_id} - - ) : ( -
{stashID.stash_id}
- ); + if (stashID !== undefined) { + const base = stashID.endpoint.match(/https?:\/\/.*?\//)?.[0]; + const link = base ? ( + + {stashID.stash_id} + + ) : ( +
{stashID.stash_id}
+ ); - const endpoint = - stashBoxes?.findIndex((box) => box.endpoint === stashID.endpoint) ?? - -1; + const endpointIndex = + stashBoxes?.findIndex((box) => box.endpoint === stashID.endpoint) ?? + -1; - return ( -
- - {link} - - {endpoint !== -1 && ( - - )} - - - {error[performer.id] && ( -
- - Error: - {error[performer.id]?.message} - -
{error[performer.id]?.details}
-
- )} -
- ); - }); - subContent = <>{stashLinks}; + subContent = ( +
+ + {link} + + {endpointIndex !== -1 && ( + + )} + + + {error[performer.id] && ( +
+ + Error: + {error[performer.id]?.message} + +
{error[performer.id]?.details}
+
+ )} +
+ ); } else if (searchErrors[performer.id]) { subContent = (