Unverified Commit e54fb8f7 authored by Marcos Iglesias's avatar Marcos Iglesias Committed by GitHub

Fixes error on TableDetail on Dev (#597)

Signed-off-by: 's avatarMarcos Iglesias <miglesiasvalle@lyft.com>
parent 7b221c28
...@@ -10,7 +10,10 @@ export interface ResourceReportProps { ...@@ -10,7 +10,10 @@ export interface ResourceReportProps {
const TableReportsDropdown: React.FC<ResourceReportProps> = ({ const TableReportsDropdown: React.FC<ResourceReportProps> = ({
resourceReports, resourceReports,
}: ResourceReportProps) => { }: ResourceReportProps) => {
if (resourceReports === null || resourceReports.length < 1) return null; if (!resourceReports || resourceReports.length < 1) {
return null;
}
return ( return (
<Dropdown id="user-dropdown"> <Dropdown id="user-dropdown">
<Dropdown.Toggle className="btn btn-default btn-lg"> <Dropdown.Toggle className="btn btn-default btn-lg">
......
export const PROGRMMATIC_DESC_HEADER = 'Read-only information, auto-generated';
export const ERROR_MESSAGE = 'Something went wrong...'; export const ERROR_MESSAGE = 'Something went wrong...';
export const EDIT_DESC_TEXT = 'Click to edit description in'; export const EDIT_DESC_TEXT = 'Click to edit description in';
...@@ -50,6 +50,7 @@ import { ...@@ -50,6 +50,7 @@ import {
} from 'interfaces'; } from 'interfaces';
import EditableSection from 'components/common/EditableSection'; import EditableSection from 'components/common/EditableSection';
import TableReportsDropdown from 'components/TableDetail/ResourceReportsDropdown';
import { formatDateTimeShort } from 'utils/dateUtils'; import { formatDateTimeShort } from 'utils/dateUtils';
import { getLoggingParams } from 'utils/logUtils'; import { getLoggingParams } from 'utils/logUtils';
...@@ -57,14 +58,9 @@ import { getLoggingParams } from 'utils/logUtils'; ...@@ -57,14 +58,9 @@ import { getLoggingParams } from 'utils/logUtils';
import RequestDescriptionText from './RequestDescriptionText'; import RequestDescriptionText from './RequestDescriptionText';
import RequestMetadataForm from './RequestMetadataForm'; import RequestMetadataForm from './RequestMetadataForm';
import { import { ERROR_MESSAGE, EDIT_DESC_TEXT } from './constants';
PROGRMMATIC_DESC_HEADER,
ERROR_MESSAGE,
EDIT_DESC_TEXT,
} from './constants';
import './styles.scss'; import './styles.scss';
import TableReportsDropdown from 'components/TableDetail/ResourceReportsDropdown';
const SERVER_ERROR_CODE = 500; const SERVER_ERROR_CODE = 500;
const DASHBOARDS_PER_PAGE = 10; const DASHBOARDS_PER_PAGE = 10;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment