mirror of
https://github.com/stashapp/stash.git
synced 2025-12-15 21:03:22 +01:00
fix for PerformerCard Title Display
previously showing '[Object][Object]'
This commit is contained in:
parent
74e4cc9325
commit
b166cf59f7
2 changed files with 10 additions and 4 deletions
|
|
@ -231,10 +231,14 @@ export const GridCard: React.FC<ICardProps> = (props: ICardProps) => {
|
|||
{props.pretitleIcon}
|
||||
<TruncatedText
|
||||
text={
|
||||
<TitleDisplay
|
||||
text={typeof props.title === "string" ? props.title : String(props.title)}
|
||||
className="title-display"
|
||||
/>
|
||||
typeof props.title === "string" ? (
|
||||
<TitleDisplay
|
||||
text={props.title}
|
||||
className="title-display"
|
||||
/>
|
||||
) : (
|
||||
props.title
|
||||
)
|
||||
}
|
||||
lineCount={2}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ interface ITitleDisplayProps {
|
|||
}
|
||||
|
||||
export const TitleDisplay: React.FC<ITitleDisplayProps> = ({ text, className }) => {
|
||||
if (!text) return null;
|
||||
|
||||
return (
|
||||
<div className={className}>
|
||||
{text.split('\n').map((line, i) => (
|
||||
|
|
|
|||
Loading…
Reference in a new issue