import React from 'react'; import { Resource } from './Resource'; import { Artifact } from './artifact/Artifact'; import { BaseEnvironment } from '../environmentBaseElements/BaseEnvironment'; import type { ICollapsibleSectionProps } from '../../presentation'; import { CollapsibleSection } from '../../presentation'; import type { QueryEnvironment } from './types'; const sectionProps: Partial = { outerDivClassName: 'environment-section', headingClassName: 'environment-section-heading', bodyClassName: 'environment-section-body', }; interface IEnvironmentProps { environment: QueryEnvironment; } export const EnvironmentOverview = ({ environment }: IEnvironmentProps) => { const state = environment.state; return ( {state.artifacts?.length ? ( state.artifacts.map((artifact) => ( )) ) : ( No artifacts found )} {state.resources?.length ? ( state.resources.map((resource) => ( )) ) : ( No resources found )} ); }; const NoItemsMessage: React.FC = ({ children }) => (
{children}
);