Conversation
rudestewing
commented
Jan 16, 2021
- Auth page for crew
- authorization client-side redirection
- crew dashboard
|
Ada conflict @rudestewing . |
Co-authored-by: Muhammad Arief Rahman <awc.aliana@gmail.com>
Co-authored-by: Muhammad Arief Rahman <awc.aliana@gmail.com>
sudah ya pack ~ |
| return allowedType.name == type | ||
| }) | ||
|
|
||
| return _type ? _type : allowedTypes[0] |
There was a problem hiding this comment.
Harusnya gak ada case kayak gini bukan @rudestewing ? Jika type-nya gak ada di allowedType akan di return default, jadi ini langsung bisa return _type
There was a problem hiding this comment.
gw blm paham maksud lu
There was a problem hiding this comment.
Maksud gue kalo diubah kayak gini masalah kah?
return allowedTypes[type] ?? allowedTypes['default']
const _type = allowedTypes.find((allowedType) => {
return allowedType.name == type
})
return _typeThere was a problem hiding this comment.
seharusnya _type itu gk ada sih
function selectedType() {
return allowedTypes[type] ?? allowedTypes['default']
}
jadi kodenya harusnya sampe sini doang cuma gw lupa apus yg bawah
lebih simple
| } | ||
|
|
||
| function selectedStatus() { | ||
| return allowedStatuses[status] ?? allowedStatuses[0] |
There was a problem hiding this comment.
Default-nya gini aja @rudestewing
| return allowedStatuses[status] ?? allowedStatuses[0] | |
| return allowedStatuses[status] ?? allowedStatuses[2] |
|
|
||
| const BadgeReportStatus = ({status}) => { | ||
|
|
||
| const allowedStatuses = { |
There was a problem hiding this comment.
Kenapa gak pake array aja?
Co-authored-by: Muhammad Arief Rahman <awc.aliana@gmail.com>
Co-authored-by: Muhammad Arief Rahman <awc.aliana@gmail.com>