From 6210f12e8e9f593d629d22278d78310482ca0cfa Mon Sep 17 00:00:00 2001 From: Danshil Kokil Mungur Date: Mon, 22 Mar 2021 02:33:36 +0400 Subject: [PATCH] fix(ui): hide 'show details' button if there are no additional details (#1254) --- .../Settings/SettingsLogs/index.tsx | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/src/components/Settings/SettingsLogs/index.tsx b/src/components/Settings/SettingsLogs/index.tsx index 9ca0d0ff0..6f79a7c6a 100644 --- a/src/components/Settings/SettingsLogs/index.tsx +++ b/src/components/Settings/SettingsLogs/index.tsx @@ -1,22 +1,22 @@ +import copy from 'copy-to-clipboard'; +import { useRouter } from 'next/router'; import React, { useEffect, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; -import copy from 'copy-to-clipboard'; +import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; import { LogMessage, LogsResultsResponse, } from '../../../../server/interfaces/api/settingsInterfaces'; +import globalMessages from '../../../i18n/globalMessages'; import Error from '../../../pages/_error'; import Badge from '../../Common/Badge'; import Button from '../../Common/Button'; import LoadingSpinner from '../../Common/LoadingSpinner'; +import Modal from '../../Common/Modal'; import PageTitle from '../../Common/PageTitle'; import Table from '../../Common/Table'; -import globalMessages from '../../../i18n/globalMessages'; -import { useRouter } from 'next/router'; -import Modal from '../../Common/Modal'; import Transition from '../../Transition'; -import { useToasts } from 'react-toast-notifications'; const messages = defineMessages({ logs: 'Logs', @@ -358,14 +358,16 @@ const SettingsLogs: React.FC = () => { {row.label} {row.message} - + {row.data && ( + + )}