Fakultas Ilmu Komputer UI

VacancyPage.jsx 1.14 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 (
27
28
29
30
31
32
33
34
35
36
37
38
39
      <div className="halamanLowongan">
        <Tabs selected={0}>
          <Pane label="Semua Lowongan" >
            <VacancyList key={1} url="/vacancies/" />
          </Pane>
          <Pane label="Lamaran saya" >
            <VacancyList key={2} url={`/students/${student.id}/applied-vacancies/`} />
          </Pane>
          <Pane label="Lamaran Ditandai" >
            <VacancyList key={3} url={`/students/${student.id}/bookmarked-vacancies/`} />
          </Pane>
        </Tabs>
      </div>
40
    );
41
  }
42
}