Fakultas Ilmu Komputer UI

VacancyPage.jsx 1.18 KB
Newer Older
1
2
3
4
import React from 'react';
import Tabs from './components/Tabs';
import Pane from './components/Pane';
import VacancyList from './components/VacancyList';
5
import Server from './lib/Server';
6
7
8
9
10
11

export default class VacancyPage extends React.Component {

  constructor(props) {
    super(props);
    /* istanbul ignore next */
12
13
14
15
    this.state = {
      email: '',
      password: '',
      errorFlag: false,
16
      vacancies: [],
17
    };
18
19
20
21
22
    this.handleItemClick = this.handleItemClick.bind(this);
  }

  handleItemClick = (e, { name }) => this.setState({ activeItem: name });

23
24
25
26
27
28
29
  // fetchVacancies(url) {
  //   console.log("maho");
  //   Server.get(url).then((data) => {
  //     this.setState({ vacancies: data });
  //   }, () => {
  //   });
  // }
30

31
  render() {
32
    const data = [{ data1: 'Software Enggineer' }, { data1: 'System Analyst' }];
33

34
    return (<div>
35
36
      <Tabs selected={0}>
        <Pane label="Semua Lowongan" >
37
          <VacancyList url="/vacancies/" />
38
39
        </Pane>
        <Pane label="Lamaran saya" >
40
          <VacancyList url="/b" />
41
42
        </Pane>
        <Pane label="Lamaran Ditandai" >
43
          <VacancyList url="/c" />
44
45
46
        </Pane>
      </Tabs>
    </div>
47
48

    );
49
  }
50
}