Fakultas Ilmu Komputer UI

VacancyList.jsx 473 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import React from 'react';
import Lowongan from './Lowongan';

export default class VacancyList extends React.Component {

  static propTypes = {
    vacancies: React.PropTypes.array
  };

  static defaultProps = {
    vacancies: [],
  };

  generateVacancies(){
    return(
      this.props.vacancies.map((vacancyData) =>
        <Lowongan data={vacancyData}/>)
    );
  }

  render = () => (
    <div className="vscancyList" >{ this.generateVacancies() }
    </div>
  )
}