mirror of
https://github.com/stashapp/stash.git
synced 2026-05-09 05:05:29 +02:00
Normalize formatting patterns in tagger performer preview files.
Restructure imports and helper formatting to better match repository Prettier conventions. Made-with: Cursor
This commit is contained in:
parent
609395cbeb
commit
ba2ec74f4b
2 changed files with 13 additions and 13 deletions
|
|
@ -4,10 +4,7 @@ import { FormattedMessage } from "react-intl";
|
|||
|
||||
import * as GQL from "src/core/generated-graphql";
|
||||
import { OptionalField } from "../IncludeButton";
|
||||
import {
|
||||
Performer,
|
||||
PerformerSelect,
|
||||
} from "src/components/Performers/PerformerSelect";
|
||||
import { Performer, PerformerSelect } from "src/components/Performers/PerformerSelect";
|
||||
import { getStashboxBase } from "src/utils/stashbox";
|
||||
import { ExternalLink } from "src/components/Shared/ExternalLink";
|
||||
import { Link } from "react-router-dom";
|
||||
|
|
|
|||
|
|
@ -13,19 +13,21 @@ interface IScrapedPerformerPreviewProps {
|
|||
|
||||
const toPerformerCardData = (
|
||||
performer: GQL.ScrapedPerformer
|
||||
): GQL.PerformerDataFragment =>
|
||||
({
|
||||
): GQL.PerformerDataFragment => {
|
||||
const aliasList = performer.aliases
|
||||
? performer.aliases
|
||||
.split(",")
|
||||
.map((a) => a.trim())
|
||||
.filter(Boolean)
|
||||
: [];
|
||||
|
||||
return {
|
||||
id:
|
||||
performer.stored_id ??
|
||||
performer.remote_site_id ??
|
||||
`scraped-${performer.name?.replace(/\s+/g, "-").toLowerCase() ?? "performer"}`,
|
||||
name: performer.name ?? "Unknown performer",
|
||||
alias_list: performer.aliases
|
||||
? performer.aliases
|
||||
.split(",")
|
||||
.map((a) => a.trim())
|
||||
.filter(Boolean)
|
||||
: [],
|
||||
alias_list: aliasList,
|
||||
disambiguation: performer.disambiguation ?? null,
|
||||
gender: performer.gender ?? null,
|
||||
birthdate: performer.birthdate ?? null,
|
||||
|
|
@ -45,7 +47,8 @@ const toPerformerCardData = (
|
|||
o_counter: null,
|
||||
rating100: null,
|
||||
urls: performer.urls ?? [],
|
||||
}) as unknown as GQL.PerformerDataFragment;
|
||||
} as unknown as GQL.PerformerDataFragment;
|
||||
};
|
||||
|
||||
const ScrapedPerformerCard = ({
|
||||
performer,
|
||||
|
|
|
|||
Loading…
Reference in a new issue