diff --git a/client/src/controllers/PaginatedListController.jsx b/client/src/controllers/PaginatedListController.jsx index a3aa761..bdf0361 100644 --- a/client/src/controllers/PaginatedListController.jsx +++ b/client/src/controllers/PaginatedListController.jsx @@ -35,7 +35,6 @@ export default function PaginatedListController({ if (hasAnswerAnchor) { const anchorAnswer = document.getElementById('answersList'); anchorAnswer.scrollIntoView({ behavior: 'smooth' }); - console.log(123, scroll, anchorAnswer) } }, 2000) } diff --git a/client/src/controllers/QAControllers/QAPaginatedListController.jsx b/client/src/controllers/QAControllers/QAPaginatedListController.jsx index 0b2fdff..f6382b5 100644 --- a/client/src/controllers/QAControllers/QAPaginatedListController.jsx +++ b/client/src/controllers/QAControllers/QAPaginatedListController.jsx @@ -35,7 +35,7 @@ export function AnswersList() { .catch(() => []); const currentLocation = window.location.href; const hasAnswerAnchor = currentLocation.includes('#'); - // console.log(answersList, 1111) + if (hasAnswerAnchor) { const anchorAnswerId = `${currentLocation.substring(currentLocation.indexOf("#") + 1)}`; answersList.forEach(function (answer, i) { @@ -45,8 +45,9 @@ export function AnswersList() { } }); } - // console.log(answersList, 222) - + if (answersList.length > 2 && answersList[0].answer_id === answersList[1].answer_id) + answersList.splice(0, 1); + return answersList; }