pl-fe: fix preview card?

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2025-09-06 21:54:34 +02:00
parent 2c12ff916d
commit 3a87a9a409

View File

@ -38,7 +38,6 @@ const PreviewCard: React.FC<IPreviewCard> = ({
compact = false,
cacheWidth,
onOpenMedia,
horizontal,
}): JSX.Element => {
const [width, setWidth] = useState(defaultWidth);
const [embedded, setEmbedded] = useState(false);
@ -113,8 +112,8 @@ const PreviewCard: React.FC<IPreviewCard> = ({
};
const interactive = card.type !== 'link';
horizontal = typeof horizontal === 'boolean' ? horizontal : interactive || embedded;
const className = clsx('status-card relative z-10 bg-white black:bg-black dark:bg-primary-900', { horizontal, compact, interactive }, `status-card--${card.type}`);
const horizontal = interactive || embedded;
const className = clsx('status-card relative z-10 flex-col bg-white black:bg-black dark:bg-primary-900 md:flex-row', { horizontal, compact, interactive }, `status-card--${card.type}`);
const ratio = getRatio(card);
const height = (compact && !embedded) ? (width / (16 / 9)) : (width / ratio);