How to use the apollo-client.NetworkStatus.loading function in apollo-client

To help you get started, we’ve selected a few apollo-client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zendesk / volunteer_portal / app / javascript / pages / admin / Events / new.js View on Github external
const NewEvent = ({ createEvent, data: { networkStatus, event, eventTypes, offices, organizations } }) =>
  networkStatus === NetworkStatus.loading ? (
    
  ) : (
    
  )
github zendesk / volunteer_portal / app / javascript / pages / admin / Users / index.js View on Github external
const Users = ({ data: { networkStatus, users }, deleteUser, togglePopover, destroyUserPopover }) =>
  networkStatus === NetworkStatus.loading ? (
    
  ) : (
    <div>
       null}
        data={users}
        columns={columns(togglePopover)}
        minRows={0}
        defaultFilterMethod={defaultFilterMethod}
        getProps={containerProps}
        getTableProps={tableProps}
        getTheadProps={theadProps}
        getTheadThProps={thProps}
        getTrGroupProps={trProps}
        getTrProps={trProps}
        getTdProps={tdProps}</div>
github zendesk / volunteer_portal / app / javascript / pages / admin / Reporting / index.js View on Github external
const ReportingPage = ({
  data: { networkStatus, users },
  reportingStartDate,
  reportingEndDate,
  changeAdminReportingStart,
  changeAdminReportingEnd,
}) =&gt;
  networkStatus === NetworkStatus.loading ? (
    
  ) : (
    <div>
      <div>
        
      </div>
    </div>
  )
github zendesk / volunteer_portal / app / javascript / pages / Calendar / index.js View on Github external
data: { networkStatus, fetchMore, currentUser, events, offices },
  locationBeforeTransitions,
  filters,
  eventPopover,
  togglePopover,
  changeShowFilter,
  changeEventFilter,
  changeOfficeFilter,
  createSignup,
  destroySignup,
  calendarDateChange,
  calendarDate,
}) =&gt; (
  <div>
    
    {eventPopover ? (
      </div>
github zendesk / volunteer_portal / app / javascript / pages / admin / Organizations / edit.js View on Github external
const EditOrganization = ({ data: { networkStatus, organization }, updateOrganization }) =&gt;
  networkStatus === NetworkStatus.loading ? (
    
  ) : (
    
  )
github zendesk / volunteer_portal / app / javascript / pages / App / index.js View on Github external
render() {
    const {
      data: { networkStatus, currentUser, offices },
      togglePopover,
      popover,
      children,
      updateUserOffice,
    } = this.props

    return (
      
        {children}
      
    )
  }
}
github zendesk / volunteer_portal / app / javascript / pages / admin / Organizations / index.js View on Github external
const Organizations = ({
  data: { networkStatus, organizations },
  deleteOrganization,
  togglePopover,
  destroyOrganizationPopover,
}) =&gt;
  networkStatus === NetworkStatus.loading ? (
    
  ) : (
    <div>
      <div>
        
          <button>Add Organization</button>
        
      </div>
       null}
        data={organizations}
        columns={columns(togglePopover)}
        minRows={0}
        defaultFilterMethod={defaultFilterMethod}
        getProps={containerProps}
        getTableProps={tableProps}</div>
github zendesk / volunteer_portal / app / javascript / pages / Dashboard / index.js View on Github external
const LeaderboardContainer = ({
  data: { networkStatus, volunteers, offices, currentUser },
  dashboardOfficeFilter,
  changeDashboardOfficeFilter,
}) =&gt;
  networkStatus === NetworkStatus.loading ? (
    
  ) : (
    <div>
      <div>
        <div>Top Volunteers</div>
        
      </div>
      {sortByHours(volunteers).map((user, i) =&gt; (
        <div>
          
          <span>{user.hours} hours</span>
        </div></div>
github zendesk / volunteer_portal / app / javascript / pages / admin / Events / edit.js View on Github external
const EditEvent = ({
  data: { networkStatus, event, eventTypes, offices, organizations },
  updateEvent,
  destroySignup,
}) =&gt;
  networkStatus === NetworkStatus.loading ? (
    
  ) : (
     destroySignup(event, user)}
      organizations={organizations}
      onSubmit={updateEvent}
    /&gt;
  )
github zendesk / volunteer_portal / app / javascript / pages / admin / EventTypes / index.js View on Github external
const EventTypes = ({ data: { networkStatus, eventTypes }, deleteEventType, togglePopover, destroyEventTypePopover }) =&gt;
  networkStatus === NetworkStatus.loading ? (
    
  ) : (
    <div>
      <div>
        
          <button>Add Event Type</button>
        
      </div>
       null}
        data={eventTypes}
        columns={columns(togglePopover)}
        minRows={0}
        defaultFilterMethod={defaultFilterMethod}
        getProps={containerProps}
        getTableProps={tableProps}</div>