import React from 'react';
import { View } from 'react-native';
import { ApplicationList } from '../../components/employee/EmployeeApplicationList';
import { RenderErrorView } from '../RenderError';

export class EmployeeApplications extends React.Component {

  state = { error: false };

  componentDidCatch() {
    this.setState({ error: true });
  }

  render() {
    return this.state.error
      && <RenderErrorView />
      || (
        <View style={{ flex: 1 }}>
          <ApplicationList />
        </View>
      );
  }
}
