New spotlight media
This commit is contained in:
@ -8,7 +8,7 @@ import { MediaElement } from "Element/MediaElement";
|
||||
interface RevealMediaProps {
|
||||
creator: string;
|
||||
link: string;
|
||||
disableSpotlight?: boolean;
|
||||
onMediaClick?: (e: React.MouseEvent<HTMLImageElement>) => void;
|
||||
}
|
||||
|
||||
export default function RevealMedia(props: RevealMediaProps) {
|
||||
@ -53,12 +53,10 @@ export default function RevealMedia(props: RevealMediaProps) {
|
||||
return (
|
||||
<Reveal
|
||||
message={<FormattedMessage defaultMessage="Click to load content from {link}" values={{ link: hostname }} />}>
|
||||
<MediaElement mime={`${type}/${extension}`} url={url.toString()} disableSpotlight={props.disableSpotlight} />
|
||||
<MediaElement mime={`${type}/${extension}`} url={url.toString()} onMediaClick={props.onMediaClick} />
|
||||
</Reveal>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<MediaElement mime={`${type}/${extension}`} url={url.toString()} disableSpotlight={props.disableSpotlight} />
|
||||
);
|
||||
return <MediaElement mime={`${type}/${extension}`} url={url.toString()} onMediaClick={props.onMediaClick} />;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user