mirror of
https://github.com/stashapp/stash.git
synced 2026-05-09 05:05:29 +02:00
Apply Prettier formatting to tagger preview files.
Format PerformerResult and ScrapedPerformerPreview with Prettier to satisfy validate-ui format checks. Made-with: Cursor
This commit is contained in:
parent
accc6ad1ae
commit
49a777c97f
2 changed files with 25 additions and 10 deletions
|
|
@ -35,7 +35,7 @@ const pushDeltaIfDifferent = (
|
|||
rows: IPerformerDeltaRow[],
|
||||
label: string,
|
||||
remoteValue: unknown,
|
||||
localValue: unknown
|
||||
localValue: unknown,
|
||||
) => {
|
||||
const remoteText = toStringOrNull(remoteValue);
|
||||
if (!remoteText) return;
|
||||
|
|
@ -46,7 +46,7 @@ const pushDeltaIfDifferent = (
|
|||
|
||||
const buildPerformerDeltaRows = (
|
||||
remote: GQL.ScrapedPerformer,
|
||||
local: GQL.PerformerDataFragment
|
||||
local: GQL.PerformerDataFragment,
|
||||
): IPerformerDeltaRow[] => {
|
||||
const rows: IPerformerDeltaRow[] = [];
|
||||
|
||||
|
|
@ -61,19 +61,29 @@ const buildPerformerDeltaRows = (
|
|||
rows,
|
||||
"Penis Length",
|
||||
remote.penis_length,
|
||||
local.penis_length
|
||||
local.penis_length,
|
||||
);
|
||||
pushDeltaIfDifferent(
|
||||
rows,
|
||||
"Circumcised",
|
||||
remote.circumcised,
|
||||
local.circumcised,
|
||||
);
|
||||
pushDeltaIfDifferent(rows, "Circumcised", remote.circumcised, local.circumcised);
|
||||
pushDeltaIfDifferent(
|
||||
rows,
|
||||
"Measurements",
|
||||
remote.measurements,
|
||||
local.measurements
|
||||
local.measurements,
|
||||
);
|
||||
pushDeltaIfDifferent(rows, "Fake Tits", remote.fake_tits, local.fake_tits);
|
||||
pushDeltaIfDifferent(rows, "Tattoos", remote.tattoos, local.tattoos);
|
||||
pushDeltaIfDifferent(rows, "Piercings", remote.piercings, local.piercings);
|
||||
pushDeltaIfDifferent(rows, "Career Start", remote.career_start, local.career_start);
|
||||
pushDeltaIfDifferent(
|
||||
rows,
|
||||
"Career Start",
|
||||
remote.career_start,
|
||||
local.career_start,
|
||||
);
|
||||
pushDeltaIfDifferent(rows, "Career End", remote.career_end, local.career_end);
|
||||
|
||||
const remoteAliasesCount = remote.aliases
|
||||
|
|
@ -154,7 +164,7 @@ const PerformerResult: React.FC<IPerformerResultProps> = ({
|
|||
const matchedStashID = matchedPerformer?.stash_ids.some(
|
||||
(stashID) =>
|
||||
stashID.endpoint === endpoint &&
|
||||
stashID.stash_id === performer.remote_site_id
|
||||
stashID.stash_id === performer.remote_site_id,
|
||||
);
|
||||
const [selectedPerformer, setSelectedPerformer] = useState<Performer>();
|
||||
const { data: selectedPerformerData, loading: selectedPerformerLoading } =
|
||||
|
|
@ -195,7 +205,8 @@ const PerformerResult: React.FC<IPerformerResultProps> = ({
|
|||
selectPerformer(undefined);
|
||||
};
|
||||
|
||||
if (stashLoading || selectedPerformerLoading) return <div>Loading performer</div>;
|
||||
if (stashLoading || selectedPerformerLoading)
|
||||
return <div>Loading performer</div>;
|
||||
|
||||
if (matchedPerformer && matchedStashID) {
|
||||
return (
|
||||
|
|
@ -242,7 +253,7 @@ const PerformerResult: React.FC<IPerformerResultProps> = ({
|
|||
? selectedPerformerDetails.stash_ids.find(
|
||||
(stashID) =>
|
||||
stashID.endpoint === endpoint &&
|
||||
stashID.stash_id !== performer.remote_site_id
|
||||
stashID.stash_id !== performer.remote_site_id,
|
||||
)
|
||||
: undefined;
|
||||
const selectedPerformerDeltaRows = selectedPerformerDetails
|
||||
|
|
|
|||
|
|
@ -48,7 +48,11 @@ const toPerformerCardData = (performer: GQL.ScrapedPerformer) => {
|
|||
} as unknown as GQL.PerformerDataFragment;
|
||||
};
|
||||
|
||||
const ScrapedPerformerCard = ({ performer }: { performer: GQL.ScrapedPerformer }) => {
|
||||
const ScrapedPerformerCard = ({
|
||||
performer,
|
||||
}: {
|
||||
performer: GQL.ScrapedPerformer;
|
||||
}) => {
|
||||
return (
|
||||
<div className="tag-popover-card tagger-scraped-performer-popover">
|
||||
<PerformerCard performer={toPerformerCardData(performer)} zoomIndex={0} />
|
||||
|
|
|
|||
Loading…
Reference in a new issue