diff --git a/src/component/rent/Rent.tsx b/src/component/rent/Rent.tsx index 928f42e7..59b9401e 100644 --- a/src/component/rent/Rent.tsx +++ b/src/component/rent/Rent.tsx @@ -21,6 +21,8 @@ const Rent = () => { const { Modal, setOpen: openModal, setClose: closeModal } = useModal(); const user = useRecoilValue(userAtom); + // 사서의 대출권수 4권으로 설정. 사서 본인의 대출건만 4권으로 적용 + const lendingLimit = (user.isAdmin && user.id === selectedUser?.id) ? 4 : 2; return (
@@ -32,7 +34,6 @@ const Rent = () => { titleKO="카뎃 정보" titleEN="Cadet info" /> - {/* 사서인 경우 옆에 표시해주면 좋을 것 같다! */} { /> {selectedBooks.length > 0 ? selectedBooks.map((book, index) => ( - - )) + + )) : null} - {selectedBooks.length < 4 ? ( + {selectedBooks.length < lendingLimit ? (