diff --git a/src/components/media-modal.jsx b/src/components/media-modal.jsx
index 4b72e66e..3c920cc2 100644
--- a/src/components/media-modal.jsx
+++ b/src/components/media-modal.jsx
@@ -4,13 +4,12 @@ import { useEffect, useLayoutEffect, useRef, useState } from 'preact/hooks';
import { useHotkeys } from 'react-hotkeys-hook';
import { oklab2rgb, rgb2oklab } from '../utils/color-utils';
+import states from '../utils/states';
import Icon from './icon';
import Link from './link';
import Media from './media';
-import MediaAltModal from './media-alt-modal';
import MenuLink from './menu-link';
-import Modal from './modal';
function MediaModal({
mediaAttachments,
@@ -154,10 +153,10 @@ function MediaModal({
class="media-alt"
hidden={!showControls}
onClick={() => {
- setShowMediaAlt({
+ states.showMediaAlt = {
alt: media.description,
lang,
- });
+ };
}}
>
ALT
@@ -289,23 +288,6 @@ function MediaModal({
)}
- {!!showMediaAlt && (
- {
- if (e.target === e.currentTarget) {
- setShowMediaAlt(false);
- carouselRef.current.focus();
- }
- }}
- >
- setShowMediaAlt(false)}
- />
-
- )}
);
}