Card --> PreviewCard
This commit is contained in:
parent
971bcb41e4
commit
f583e7eeb5
|
@ -20,7 +20,7 @@ const trim = (text: string, len: number): string => {
|
|||
return text.substring(0, cut) + (text.length > len ? '…' : '');
|
||||
};
|
||||
|
||||
interface ICard {
|
||||
interface IPreviewCard {
|
||||
card: CardEntity;
|
||||
maxTitle?: number;
|
||||
maxDescription?: number;
|
||||
|
@ -31,7 +31,7 @@ interface ICard {
|
|||
horizontal?: boolean;
|
||||
}
|
||||
|
||||
const Card: React.FC<ICard> = ({
|
||||
const PreviewCard: React.FC<IPreviewCard> = ({
|
||||
card,
|
||||
defaultWidth = 467,
|
||||
maxTitle = 120,
|
||||
|
@ -253,4 +253,4 @@ const Card: React.FC<ICard> = ({
|
|||
);
|
||||
};
|
||||
|
||||
export default Card;
|
||||
export default PreviewCard;
|
|
@ -2,9 +2,9 @@ import React, { Suspense } from 'react';
|
|||
|
||||
import { openModal } from 'soapbox/actions/modals';
|
||||
import AttachmentThumbs from 'soapbox/components/attachment-thumbs';
|
||||
import PreviewCard from 'soapbox/components/preview-card';
|
||||
import { GroupLinkPreview } from 'soapbox/features/groups/components/group-link-preview';
|
||||
import PlaceholderCard from 'soapbox/features/placeholder/components/placeholder-card';
|
||||
import Card from 'soapbox/features/status/components/card';
|
||||
import { MediaGallery, Video, Audio } from 'soapbox/features/ui/util/async-components';
|
||||
import { useAppDispatch } from 'soapbox/hooks';
|
||||
|
||||
|
@ -118,7 +118,7 @@ const StatusMedia: React.FC<IStatusMedia> = ({
|
|||
);
|
||||
} else if (status.spoiler_text.length === 0 && !status.quote && status.card) {
|
||||
media = (
|
||||
<Card
|
||||
<PreviewCard
|
||||
onOpenMedia={openMedia}
|
||||
card={status.card}
|
||||
compact
|
||||
|
|
Loading…
Reference in New Issue