import React, { Component, Fragment } from 'react'; import { Gallery, GalleryItem, PageSection, PageSectionVariants, Title, } from '@patternfly/react-core'; import OrganizationCard from '../components/OrganizationCard'; import api from '../api'; class Organizations extends Component { constructor (props) { super(props); this.state = { organizations: [] }; } componentDidMount () { api.getOrganizations() .then(({ data }) => this.setState({ organizations: data.results })); } render () { const { light, medium } = PageSectionVariants; const { organizations } = this.state; return ( Organizations {organizations.map(o => ( ))} ); } } export default Organizations;