diff --git a/package.json b/package.json index 60500240..b34fa84d 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "i18next-browser-languagedetector": "7.1.0", "i18next-http-backend": "2.2.2", "json-stringify-pretty-compact": "4.0.0", + "lodash": "4.17.21", "memoizee": "0.4.15", "prettier": "3.0.3", "react": "18.2.0", diff --git a/src/components/post/comment-tools/comment-tools.tsx b/src/components/post/comment-tools/comment-tools.tsx index dba9578c..6dd1ac03 100644 --- a/src/components/post/comment-tools/comment-tools.tsx +++ b/src/components/post/comment-tools/comment-tools.tsx @@ -39,10 +39,10 @@ const PostTools = ({ author, cid, hasLabel, index, isAuthor, isMod, subplebbitAd // show gray dotted border around last clicked post const handlePostClick = () => { if (cid) { - if (localStorage.getItem('lastClickedPost') === cid) { - localStorage.removeItem('lastClickedPost'); + if (sessionStorage.getItem('lastClickedPost') === cid) { + sessionStorage.removeItem('lastClickedPost'); } else { - localStorage.setItem('lastClickedPost', cid); + sessionStorage.setItem('lastClickedPost', cid); } } }; diff --git a/src/components/post/expando/expando.module.css b/src/components/post/expando/expando.module.css index 606c4b13..14387150 100644 --- a/src/components/post/expando/expando.module.css +++ b/src/components/post/expando/expando.module.css @@ -68,6 +68,7 @@ color: white; text-transform: lowercase; position: absolute; + font-size: 12px; z-index: 1; top: 50%; left: 50%; diff --git a/src/components/post/expando/expando.tsx b/src/components/post/expando/expando.tsx index ea647449..fd42a12c 100644 --- a/src/components/post/expando/expando.tsx +++ b/src/components/post/expando/expando.tsx @@ -24,16 +24,13 @@ const Expando = ({ commentMediaInfo, content, expanded, link, reason, removed, s const [showSpoiler, setShowSpoiler] = useState(false); let mediaComponent = null; - let noExpandButton = false; if (commentMediaInfo?.type === 'image') { mediaComponent = ; - noExpandButton = true; } else if (commentMediaInfo?.type === 'video' && expanded) { mediaComponent =