mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-11-03 20:37:24 +03:00
Remove code display in notification when useless
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8816 GitOrigin-RevId: bb9fb429670f286579d8cdad7ebcaa41e9c18b28
This commit is contained in:
parent
4a15cfae99
commit
13a4710083
@ -98,7 +98,7 @@ export const getNotificationDetails = (
|
||||
detailsJson: Json,
|
||||
children: React.ReactNode
|
||||
) => {
|
||||
return (
|
||||
return children ? (
|
||||
<div className="notification-details">
|
||||
<AceEditor
|
||||
readOnly
|
||||
@ -115,7 +115,7 @@ export const getNotificationDetails = (
|
||||
/>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
) : null;
|
||||
};
|
||||
|
||||
// NOTE: this type has been created by reverse-engineering the original getErrorMessage function
|
||||
@ -415,7 +415,10 @@ const showWarningNotification = (
|
||||
): Thunk => {
|
||||
const children: JSX.Element[] = [];
|
||||
if (dataObj) {
|
||||
children.push(getNotificationDetails(dataObj, null));
|
||||
const notificationDetails = getNotificationDetails(dataObj, null);
|
||||
if (notificationDetails) {
|
||||
children.push(notificationDetails);
|
||||
}
|
||||
}
|
||||
if (child) {
|
||||
children.push(child);
|
||||
|
Loading…
Reference in New Issue
Block a user