Skip to content

Commit

Permalink
Fixes error on TableDetail on Dev (#597)
Browse files Browse the repository at this point in the history
Signed-off-by: Marcos Iglesias <miglesiasvalle@lyft.com>
  • Loading branch information
Golodhros authored Aug 19, 2020
1 parent 7b221c2 commit e54fb8f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ export interface ResourceReportProps {
const TableReportsDropdown: React.FC<ResourceReportProps> = ({
resourceReports,
}: ResourceReportProps) => {
if (resourceReports === null || resourceReports.length < 1) return null;
if (!resourceReports || resourceReports.length < 1) {
return null;
}

return (
<Dropdown id="user-dropdown">
<Dropdown.Toggle className="btn btn-default btn-lg">
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Original file line number Diff line number Diff line change
Expand Up @@ -50,21 +50,17 @@ 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';

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;
Expand Down

0 comments on commit e54fb8f

Please sign in to comment.