feat(MoveToShelf): move selected books to shelf
This commit is contained in:
parent
65e9aa2e0b
commit
c03aa30cfd
12 changed files with 331 additions and 69 deletions
frontend/src/shared/components/modals
|
@ -6,8 +6,9 @@ import { CheckoutBookModal } from "./CheckoutModal";
|
|||
import { ScannerModal } from "./ScannerModal";
|
||||
import { DeleteBookModal } from "./DeleteBookModal";
|
||||
import { ModalContextType } from "../../../App";
|
||||
import { MoveShelfModal } from "./MoveShelfModal";
|
||||
|
||||
const { auth, book, checkout, scanner, del } = modalTypes;
|
||||
const { auth, book, checkout, scanner, del, moveShelf } = modalTypes;
|
||||
|
||||
export const ModalSelector = ({
|
||||
activeModal,
|
||||
|
@ -48,7 +49,15 @@ export const ModalSelector = ({
|
|||
<DeleteBookModal
|
||||
open={activeModal?.type === del}
|
||||
onClose={activeModal?.type === del ? activeModal.onClose : setActiveModal}
|
||||
uuid={activeModal?.type === checkout ? activeModal.uuid : ""}
|
||||
uuid={activeModal?.type === del ? activeModal.uuid : ""}
|
||||
title={activeModal?.type === del ? activeModal.title : ""}
|
||||
/>
|
||||
<MoveShelfModal
|
||||
books={activeModal?.type === moveShelf ? activeModal.books : []}
|
||||
open={activeModal?.type === moveShelf}
|
||||
onClose={
|
||||
activeModal?.type === moveShelf ? activeModal.onClose : setActiveModal
|
||||
}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue