Coursemology/coursemology2

View on GitHub
client/app/bundles/course/statistics/pages/StatisticsIndex/staff/StaffStatistics.tsx

Summary

Maintainability
A
0 mins
Test Coverage
import { FC } from 'react';

import { fetchStaffStatistics } from 'course/statistics/operations';
import LoadingIndicator from 'lib/components/core/LoadingIndicator';
import Preload from 'lib/components/wrappers/Preload';

import StaffStatisticsTable from './StaffStatisticsTable';

const StaffStatistics: FC = () => {
  return (
    <Preload render={<LoadingIndicator />} while={fetchStaffStatistics}>
      {(data) => <StaffStatisticsTable staffs={data.staff} />}
    </Preload>
  );
};

export default StaffStatistics;