From 9dc9aadf98159bee4743b16fee3109da11e89b7c Mon Sep 17 00:00:00 2001 From: viown <48097677+viown@users.noreply.github.com> Date: Thu, 6 Mar 2025 04:29:08 +0300 Subject: [PATCH] Make title optional for alert --- src/apps/dashboard/routes/libraries/nfo.tsx | 1 - src/components/SimpleAlert.tsx | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/apps/dashboard/routes/libraries/nfo.tsx b/src/apps/dashboard/routes/libraries/nfo.tsx index c0dff0f336..e7025f07e5 100644 --- a/src/apps/dashboard/routes/libraries/nfo.tsx +++ b/src/apps/dashboard/routes/libraries/nfo.tsx @@ -97,7 +97,6 @@ export const Component = () => { > diff --git a/src/components/SimpleAlert.tsx b/src/components/SimpleAlert.tsx index c67465211f..5322662d7d 100644 --- a/src/components/SimpleAlert.tsx +++ b/src/components/SimpleAlert.tsx @@ -8,7 +8,7 @@ import globalize from 'lib/globalize'; import React from 'react'; interface SimpleAlertDialog extends DialogProps { - title: string; + title?: string; text: string; onClose: () => void }; @@ -16,9 +16,11 @@ interface SimpleAlertDialog extends DialogProps { const SimpleAlert = ({ open, title, text, onClose }: SimpleAlertDialog) => { return ( - - {title} - + {title && ( + + {title} + + )} {text}