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

export class Jobs extends React.Component {

  state = { error: false };

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

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