diff --git a/src/assets/icons/arrow_icon.svg b/src/assets/icons/arrow_icon.svg new file mode 100644 index 00000000..4c0ca79b --- /dev/null +++ b/src/assets/icons/arrow_icon.svg @@ -0,0 +1,5 @@ + diff --git a/src/components/series/SeriesDetailContainer.tsx b/src/components/series/SeriesDetailContainer.tsx index 47e82458..8c5d2538 100644 --- a/src/components/series/SeriesDetailContainer.tsx +++ b/src/components/series/SeriesDetailContainer.tsx @@ -4,7 +4,6 @@ import { useContext, useEffect, useRef, useState } from 'react'; import MemoViewer from '../memo/MemoViewer'; import MemoSideBar from '../memo/MemoSideBar'; import { getMemoById } from '@/service/memos'; -import { getIsLike } from '@/service/like'; import { getCommentsByPostTypeAndPostId } from '@/service/comments'; import { getQuestionsByMemoId } from '@/service/questions'; import { Question } from '@/types/question'; @@ -19,6 +18,7 @@ import { useRouter } from 'next/navigation'; import { ModalContext } from '@/context/ModalProvider'; import { deleteSeries } from '@/service/series'; import { notifyToast } from '@/service/notification'; +import arrowIcon from '@/assets/icons/arrow_icon.svg'; type Props = { memo: Memo; @@ -88,9 +88,19 @@ export default function SeriesDetailContainer({ }); }; + const handleLeftBtnClick = () => { + if (currentIdx === 0) return; + setCurrentIdx((preIdx) => preIdx - 1); + }; + + const handleRightBtnClick = () => { + if (currentIdx === memoInfoList.length - 1) return; + setCurrentIdx((preIdx) => preIdx + 1); + }; + return (