Fakultas Ilmu Komputer UI

VacancyPage.jsx 1.26 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import React from 'react';
import { Segment, Input, Menu } from 'semantic-ui-react'
import Tabs from './components/Tabs';
import Pane from './components/Pane';
import VacancyList from './components/VacancyList';

export default class VacancyPage extends React.Component {

  constructor(props) {
    super(props);
    /* istanbul ignore next */
    this.state = { email: '', password: '', errorFlag: false };
    this.handleItemClick = this.handleItemClick.bind(this);
  }

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

  render() {
19
20
    const data = [{ data1: 'val1' }, { data1: 'val2' }];

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
    const {activeItem} = this.state;

    return (
      <div className="tabs">
        <Menu tabular>
          <Menu.Item name='Semua Lowongan' active={activeItem === 'Semua Lowongan'} onClick={this.handleItemClick}/>

          <Menu.Item name='Lamaran Saya' active={activeItem === 'Lamaran Saya'} onClick={this.handleItemClick}/>


          <Menu.Menu position='right'>
            <Menu.Item>
              <Input transparent icon={{name: 'search', link: true}} placeholder='Search users...'/>
            </Menu.Item>
          </Menu.Menu>
        </Menu>

        <Segment>
39
          <VacancyList vacancies={data} />
40
41
42
43
44
        </Segment>
      </div>
    );
  };
}