Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixes error on TableDetail on Dev #597

Merged
merged 1 commit into from
Aug 19, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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