kopia lustrzana https://gitlab.com/soapbox-pub/soapbox
Remove ImmutableList of "attachment.ts"
rodzic
c8e12c45ec
commit
7ccb5e4b33
|
@ -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'>
|
||||||
|
@ -44,4 +43,4 @@ const AttachmentThumbs = (props: IAttachmentThumbs) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default AttachmentThumbs;
|
export default AttachmentThumbs;
|
Ładowanie…
Reference in New Issue