content: import React from 'react'
  import { connect } from 'react-redux'
  
  import Instance from './Instance'
  
  export default connect(mapStateToProps)(({
    registrationObservers,
    registrationInstitution,
    onOpenSnackbar
  }) => {
    if (!registrationInstitution) {
      return <div />
    }
  
    const filterRegistrationObservers = registrationObserverToMatch =>
      registrationObserverToMatch.registrationInstitution &&
      registrationObserverToMatch.registrationInstitution._id === registrationInstitution._id
    const registrationObserversThisPage = registrationObservers.filter(filterRegistrationObservers)
  
    return (
      <div>
        {registrationObserversThisPage.map(registrationObserver =>
          <Instance
            key={registrationObserver._id}
            registrationObserver={registrationObserver}
            onOpenSnackbar={onOpenSnackbar}
            registrationInstitution={registrationInstitution}
          />
        )}
      </div>
    )
  })
  
  function mapStateToProps (state, ownProps) {
    return {
      registrationObservers: Object.values(state.registrationObservers.data)
    }
  }
  