From 4e2197331c809999aabf8feec2b59ee67ff6b946 Mon Sep 17 00:00:00 2001 From: Jackson Harper Date: Wed, 18 Jan 2023 18:01:34 +0800 Subject: [PATCH] Fix default expiration to match form --- .../components/patterns/ConfirmationModal.tsx | 5 ++--- packages/web/pages/settings/api.tsx | 20 ++++--------------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/packages/web/components/patterns/ConfirmationModal.tsx b/packages/web/components/patterns/ConfirmationModal.tsx index a05d7524f..7ff120c77 100644 --- a/packages/web/components/patterns/ConfirmationModal.tsx +++ b/packages/web/components/patterns/ConfirmationModal.tsx @@ -6,14 +6,13 @@ import { import { VStack, HStack } from '../elements/LayoutPrimitives' import { Button } from '../elements/Button' import { StyledText } from '../elements/StyledText' -import { useConfirmListener } from '../../lib/keyboardShortcuts/useKeyboardShortcuts' -import { useEffect, useRef } from 'react' type ConfirmationModalProps = { message?: string richMessage?: React.ReactNode icon?: React.ReactNode acceptButtonLabel?: string + cancelButtonLabel?: string onAccept: () => void onOpenChange: (open: boolean) => void } @@ -42,7 +41,7 @@ export function ConfirmationModal(props: ConfirmationModalProps): JSX.Element { } }} > - Cancel + {props.cancelButtonLabel ? props.cancelButtonLabel : 'Cancel'}