Fakultas Ilmu Komputer UI

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

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
23
    this.handleItemClick = this.handleItemClick.bind(this);
  }

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

  render() {
24
    const student = Storage.get('user-data').student;
25

26
    return (<div>
27
28
      <Tabs selected={0}>
        <Pane label="Semua Lowongan" >
29
          <VacancyList key={1} url="/vacancies/" />
30
31
        </Pane>
        <Pane label="Lamaran saya" >
32
          <VacancyList key={2} url={`/students/${student.id}/applied-vacancies/`} />
33
34
        </Pane>
        <Pane label="Lamaran Ditandai" >
35
          <VacancyList key={3} url={`/students/${student.id}/bookmarked-vacancies/`} />
36
37
38
        </Pane>
      </Tabs>
    </div>
39
40

    );
41
  }
42
}