diff --git a/src/components/BookDetailsEditorSuppression.tsx b/src/components/BookDetailsEditorSuppression.tsx index 2534ecf8c..5b090e84e 100644 --- a/src/components/BookDetailsEditorSuppression.tsx +++ b/src/components/BookDetailsEditorSuppression.tsx @@ -67,11 +67,7 @@ const BookDetailsEditorSuppression = ({ setOutcomeMessage( ✅{" "} - { - (resolved?.message - ? resolved.message - : defaultSuccessMessage) as React.ReactElement - } + {(resolved?.message || defaultSuccessMessage) as React.ReactElement} ); }) diff --git a/src/components/ConfirmationModalWithOutcome.tsx b/src/components/ConfirmationModalWithOutcome.tsx index 6cb323df9..14ee23494 100644 --- a/src/components/ConfirmationModalWithOutcome.tsx +++ b/src/components/ConfirmationModalWithOutcome.tsx @@ -2,8 +2,8 @@ import * as React from "react"; import { Modal } from "react-bootstrap"; import { Button } from "library-simplified-reusable-components"; -export const SHOW_CONFIRMATION = "requestConfirmation"; -export const SHOW_OUTCOME = "displayOutcome"; +export const SHOW_CONFIRMATION = "SHOW_CONFIRMATION"; +export const SHOW_OUTCOME = "SHOW_OUTCOME"; export type ModalState = | typeof SHOW_CONFIRMATION | typeof SHOW_OUTCOME diff --git a/src/editorAdapter.ts b/src/editorAdapter.ts index 860200e3a..648bda4a0 100644 --- a/src/editorAdapter.ts +++ b/src/editorAdapter.ts @@ -96,7 +96,7 @@ export default function adapter(data: OPDSEntry): BookData { authors.push(Object.assign({}, author, { role: "aut" })); } const contributors = data.contributors?.map((contributor) => ({ - name: contributor.name, + name: contributor?.name, role: contributor?.role, uri: contributor?.uri, }));