Fakultas Ilmu Komputer UI

VacancyList.jsx 544 Bytes
Newer Older
1
import React from 'react';
2
import { Item } from 'semantic-ui-react';
3
4
5
6
7
import Lowongan from './Lowongan';

export default class VacancyList extends React.Component {

  static propTypes = {
8
    vacancies: React.PropTypes.array.isRequired,
9
10
  };

11
12
  generateVacancies() {
    return this.props.vacancies.map((vacancy) =>
13
      <Lowongan key={vacancy.id} data={vacancy} />,
14
15
16
17
    );
  }

  render = () => (
18
     <Item.Group relaxed>
19
20
21
      {/*<Item.Group relaxed>*/}
        { this.generateVacancies() }
      {/*</Item.Group>*/}
22
    </Item.Group>
23
24
  )
}