From 5b75c1a7003ec76e3e59fae78736a1c0cf75a383 Mon Sep 17 00:00:00 2001 From: Tim DiLauro Date: Mon, 8 Jul 2024 22:36:50 -0400 Subject: [PATCH] Review feedback. --- src/components/BookDetailsEditorSuppression.tsx | 6 +----- src/components/ConfirmationModalWithOutcome.tsx | 4 ++-- src/editorAdapter.ts | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) 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, }));