kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Remove ImmutableList of "attachment.ts"
rodzic
84de17154c
commit
c8e12c45ec
|
@ -3,7 +3,6 @@ import linkIcon from '@tabler/icons/outline/link.svg';
|
||||||
import playerPlayIcon from '@tabler/icons/outline/player-play.svg';
|
import playerPlayIcon from '@tabler/icons/outline/player-play.svg';
|
||||||
import zoomInIcon from '@tabler/icons/outline/zoom-in.svg';
|
import zoomInIcon from '@tabler/icons/outline/zoom-in.svg';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import { List as ImmutableList } from 'immutable';
|
|
||||||
import { useState, useEffect, useRef } from 'react';
|
import { useState, useEffect, useRef } from 'react';
|
||||||
|
|
||||||
import Blurhash from 'soapbox/components/blurhash.tsx';
|
import Blurhash from 'soapbox/components/blurhash.tsx';
|
||||||
|
@ -22,7 +21,7 @@ interface IPreviewCard {
|
||||||
card: CardEntity;
|
card: CardEntity;
|
||||||
maxTitle?: number;
|
maxTitle?: number;
|
||||||
maxDescription?: number;
|
maxDescription?: number;
|
||||||
onOpenMedia: (attachments: ImmutableList<Attachment>, index: number) => void;
|
onOpenMedia: (attachments: Attachment[], index: number) => void;
|
||||||
compact?: boolean;
|
compact?: boolean;
|
||||||
defaultWidth?: number;
|
defaultWidth?: number;
|
||||||
cacheWidth?: (width: number) => void;
|
cacheWidth?: (width: number) => void;
|
||||||
|
@ -75,7 +74,7 @@ const PreviewCard: React.FC<IPreviewCard> = ({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
onOpenMedia(ImmutableList([attachment]), 0);
|
onOpenMedia([attachment], 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleEmbedClick: React.MouseEventHandler = (e) => {
|
const handleEmbedClick: React.MouseEventHandler = (e) => {
|
||||||
|
|
Ładowanie…
Reference in New Issue