fixed typo

This commit is contained in:
plebbitor
2023-04-17 10:37:58 +02:00
parent 69d59f79fc
commit cffafeaa51
3 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -11,7 +11,7 @@ import Post from '../Post';
import PostLoader from '../PostLoader'; import PostLoader from '../PostLoader';
import ReplyModal from '../ReplyModal'; import ReplyModal from '../ReplyModal';
import SettingsModal from '../SettingsModal'; import SettingsModal from '../SettingsModal';
import findParentShortCid from '../../utils/findParentShortCid'; import findShortParentCid from '../../utils/findShortParentCid';
import getCommentMediaInfo from '../../utils/getCommentMediaInfo'; import getCommentMediaInfo from '../../utils/getCommentMediaInfo';
import getDate from '../../utils/getDate'; import getDate from '../../utils/getDate';
import handleQuoteClick from '../../utils/handleQuoteClick'; import handleQuoteClick from '../../utils/handleQuoteClick';
@@ -521,7 +521,7 @@ const Board = () => {
{renderedComments?.map((reply) => { {renderedComments?.map((reply) => {
const replyMediaInfo = getCommentMediaInfo(reply); const replyMediaInfo = getCommentMediaInfo(reply);
const fallbackImgUrl = "/assets/filedeleted-res.gif"; const fallbackImgUrl = "/assets/filedeleted-res.gif";
const shortParentCid = findParentShortCid(reply.parentCid, selectedFeed); const shortParentCid = findShortParentCid(reply.parentCid, selectedFeed);
return ( return (
<div key={`rc-${reply.cid}`} className="reply-container"> <div key={`rc-${reply.cid}`} className="reply-container">
<div key={`sa-${reply.cid}`} className="side-arrows">{'>>'}</div> <div key={`sa-${reply.cid}`} className="side-arrows">{'>>'}</div>
+2 -2
View File
@@ -11,7 +11,7 @@ import Post from '../Post';
import PostLoader from '../PostLoader'; import PostLoader from '../PostLoader';
import ReplyModal from '../ReplyModal'; import ReplyModal from '../ReplyModal';
import SettingsModal from '../SettingsModal'; import SettingsModal from '../SettingsModal';
import findParentShortCid from '../../utils/findParentShortCid'; import findShortParentCid from '../../utils/findShortParentCid';
import getCommentMediaInfo from '../../utils/getCommentMediaInfo'; import getCommentMediaInfo from '../../utils/getCommentMediaInfo';
import getDate from '../../utils/getDate'; import getDate from '../../utils/getDate';
import handleQuoteClick from '../../utils/handleQuoteClick'; import handleQuoteClick from '../../utils/handleQuoteClick';
@@ -510,7 +510,7 @@ const Thread = () => {
renderedComments.map((reply) => { renderedComments.map((reply) => {
const replyMediaInfo = getCommentMediaInfo(reply); const replyMediaInfo = getCommentMediaInfo(reply);
const fallbackImgUrl = "/assets/filedeleted-res.gif"; const fallbackImgUrl = "/assets/filedeleted-res.gif";
const shortParentCid = findParentShortCid(reply.parentCid, comment); const shortParentCid = findShortParentCid(reply.parentCid, comment);
return ( return (
<div key={`pc-${reply.cid}-${Math.random()}`} className="reply-container"> <div key={`pc-${reply.cid}-${Math.random()}`} className="reply-container">
<div key={`sa-${reply.cid}`} className="side-arrows">{'>>'}</div> <div key={`sa-${reply.cid}`} className="side-arrows">{'>>'}</div>
@@ -1,4 +1,4 @@
function findParentShortCid(parentCid, input) { function findShortParentCid(parentCid, input) {
const feed = Array.isArray(input) ? input : [input]; const feed = Array.isArray(input) ? input : [input];
for (const thread of feed) { for (const thread of feed) {
@@ -6,7 +6,7 @@ function findParentShortCid(parentCid, input) {
return thread.shortCid; return thread.shortCid;
} }
if (thread.replyCount > 0 && thread.replies.pages.topAll.comments) { if (thread.replyCount > 0 && thread.replies.pages.topAll.comments) {
const shortCid = findParentShortCid(parentCid, thread.replies.pages.topAll.comments); const shortCid = findShortParentCid(parentCid, thread.replies.pages.topAll.comments);
if (shortCid) { if (shortCid) {
return shortCid; return shortCid;
} }
@@ -15,4 +15,4 @@ function findParentShortCid(parentCid, input) {
return null; return null;
} }
export default findParentShortCid; export default findShortParentCid;