forked from Kieran/snort
make grid media modal closable when not loaded
This commit is contained in:
parent
f2d46e340a
commit
df66a861f7
@ -49,9 +49,7 @@ interface SpotlightFromThreadProps {
|
|||||||
function SpotlightFromThread({ onClose, onNext, onPrev }: SpotlightFromThreadProps) {
|
function SpotlightFromThread({ onClose, onNext, onPrev }: SpotlightFromThreadProps) {
|
||||||
const thread = useContext(ThreadContext);
|
const thread = useContext(ThreadContext);
|
||||||
|
|
||||||
if (!thread?.root) return null;
|
const media = (thread.root && getEventMedia(thread.root)) || [];
|
||||||
const media = getEventMedia(thread.root);
|
|
||||||
if (media.length === 0) return;
|
|
||||||
return (
|
return (
|
||||||
<SpotlightMedia
|
<SpotlightMedia
|
||||||
className="w-full"
|
className="w-full"
|
||||||
|
Loading…
Reference in New Issue
Block a user