diff --git a/src/views/mod-queue/mod-queue.module.css b/src/views/mod-queue/mod-queue.module.css index 7357b0a1..8d003dd9 100644 --- a/src/views/mod-queue/mod-queue.module.css +++ b/src/views/mod-queue/mod-queue.module.css @@ -166,6 +166,11 @@ color: var(--mod-queue-button-text-color-hover); text-decoration: var(--mod-queue-button-text-decoration); } + + .button:disabled { + opacity: 0.5; + cursor: not-allowed; + } } .approve { @@ -270,6 +275,11 @@ background: var(--button-background-color-mobile); } + .button:disabled { + opacity: 0.5; + cursor: not-allowed; + } + .header { flex-direction: column; align-items: flex-start; diff --git a/src/views/mod-queue/mod-queue.tsx b/src/views/mod-queue/mod-queue.tsx index 9225123c..12a5808c 100644 --- a/src/views/mod-queue/mod-queue.tsx +++ b/src/views/mod-queue/mod-queue.tsx @@ -53,6 +53,7 @@ const ModQueueRow = ({ comment, showBoardColumn = false }: ModQueueRowProps) => await approve(); } catch (e) { console.error(e); + } finally { setIsModerating(false); } }; @@ -63,14 +64,11 @@ const ModQueueRow = ({ comment, showBoardColumn = false }: ModQueueRowProps) => await reject(); } catch (e) { console.error(e); + } finally { setIsModerating(false); } }; - if (isModerating) { - return null; // Or show a loading state / fade out - } - const excerpt = title || content || (getHasThumbnail(getCommentMediaInfo(link, thumbnailUrl, linkWidth, linkHeight), link) ? t('image') : t('no_content')); const postUrl = `/${boardPath}/thread/${threadCid || cid}`; @@ -88,10 +86,10 @@ const ModQueueRow = ({ comment, showBoardColumn = false }: ModQueueRowProps) =>
{formatDistanceToNow(timestamp * 1000, { addSuffix: false })}
- -