diff --git a/amundsen_application/static/js/components/TableDetail/ResourceReportsDropdown/index.tsx b/amundsen_application/static/js/components/TableDetail/ResourceReportsDropdown/index.tsx index fc5cc4d3a..5d8f1c9fc 100644 --- a/amundsen_application/static/js/components/TableDetail/ResourceReportsDropdown/index.tsx +++ b/amundsen_application/static/js/components/TableDetail/ResourceReportsDropdown/index.tsx @@ -10,7 +10,10 @@ export interface ResourceReportProps { const TableReportsDropdown: React.FC = ({ resourceReports, }: ResourceReportProps) => { - if (resourceReports === null || resourceReports.length < 1) return null; + if (!resourceReports || resourceReports.length < 1) { + return null; + } + return ( diff --git a/amundsen_application/static/js/components/TableDetail/constants.ts b/amundsen_application/static/js/components/TableDetail/constants.ts index 9dd6f99eb..e308f6b23 100644 --- a/amundsen_application/static/js/components/TableDetail/constants.ts +++ b/amundsen_application/static/js/components/TableDetail/constants.ts @@ -1,3 +1,2 @@ -export const PROGRMMATIC_DESC_HEADER = 'Read-only information, auto-generated'; export const ERROR_MESSAGE = 'Something went wrong...'; export const EDIT_DESC_TEXT = 'Click to edit description in'; diff --git a/amundsen_application/static/js/components/TableDetail/index.tsx b/amundsen_application/static/js/components/TableDetail/index.tsx index b05844caa..4e3064690 100644 --- a/amundsen_application/static/js/components/TableDetail/index.tsx +++ b/amundsen_application/static/js/components/TableDetail/index.tsx @@ -50,6 +50,7 @@ import { } from 'interfaces'; import EditableSection from 'components/common/EditableSection'; +import TableReportsDropdown from 'components/TableDetail/ResourceReportsDropdown'; import { formatDateTimeShort } from 'utils/dateUtils'; import { getLoggingParams } from 'utils/logUtils'; @@ -57,14 +58,9 @@ import { getLoggingParams } from 'utils/logUtils'; import RequestDescriptionText from './RequestDescriptionText'; import RequestMetadataForm from './RequestMetadataForm'; -import { - PROGRMMATIC_DESC_HEADER, - ERROR_MESSAGE, - EDIT_DESC_TEXT, -} from './constants'; +import { ERROR_MESSAGE, EDIT_DESC_TEXT } from './constants'; import './styles.scss'; -import TableReportsDropdown from 'components/TableDetail/ResourceReportsDropdown'; const SERVER_ERROR_CODE = 500; const DASHBOARDS_PER_PAGE = 10;