Remove ImmutableList of "attachment.ts"

update-compose
danidfra 2024-12-10 22:48:38 -03:00
rodzic c8e12c45ec
commit 7ccb5e4b33
1 zmienionych plików z 3 dodań i 4 usunięć

Wyświetl plik

@ -4,11 +4,10 @@ import { openModal } from 'soapbox/actions/modals.ts';
import { MediaGallery } from 'soapbox/features/ui/util/async-components.ts'; import { MediaGallery } from 'soapbox/features/ui/util/async-components.ts';
import { useAppDispatch } from 'soapbox/hooks/useAppDispatch.ts'; import { useAppDispatch } from 'soapbox/hooks/useAppDispatch.ts';
import type { List as ImmutableList } from 'immutable';
import type { Attachment } from 'soapbox/types/entities.ts'; import type { Attachment } from 'soapbox/types/entities.ts';
interface IAttachmentThumbs { interface IAttachmentThumbs {
media: ImmutableList<Attachment>; media: Attachment[];
onClick?(): void; onClick?(): void;
sensitive?: boolean; sensitive?: boolean;
} }
@ -18,7 +17,7 @@ const AttachmentThumbs = (props: IAttachmentThumbs) => {
const dispatch = useAppDispatch(); const dispatch = useAppDispatch();
const fallback = <div className='!h-[50px] bg-transparent' />; const fallback = <div className='!h-[50px] bg-transparent' />;
const onOpenMedia = (media: ImmutableList<Attachment>, index: number) => dispatch(openModal('MEDIA', { media, index })); const onOpenMedia = (media: Attachment[], index: number) => dispatch(openModal('MEDIA', { media, index }));
return ( return (
<div className='relative'> <div className='relative'>