Fakultas Ilmu Komputer UI

Commit dd621b42 authored by ALIF AHSANIL SATRIA's avatar ALIF AHSANIL SATRIA
Browse files

refactor dalam bentuk memperbaiki code smell

parent 4b1db830
Pipeline #24942 passed with stages
in 7 minutes and 22 seconds
......@@ -32,7 +32,6 @@ export default class ApplicantPage extends React.Component {
Server.get(`/companies/${this.props.user.data.company.id}/vacancies/`, false).then(
(data) => {
const results = data.results;
const names = ['Semua Lowongan'];
const urls = [
{
key: 0,
......
......@@ -87,18 +87,12 @@ export default class App extends React.Component {
handleHome= (nextState, replace, cb) => {
if (Server.isLoggedIn()) {
if (App.getRole() === 'student') {
replace({ pathname: '/lowongan' });
cb();
} else if (App.getRole() === 'company') {
if (App.getRole() === 'student' || App.getRole() === 'company' || App.getRole() === 'supervisor') {
replace({ pathname: '/lowongan' });
cb();
} else if (App.getRole() === 'admin') {
replace({ pathname: '/perusahaan' });
cb();
} else if (App.getRole() === 'supervisor') {
replace({ pathname: '/lowongan' });
cb();
}
}
replace({ pathname: '/login' }); cb();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment