Skip to content

Commit

Permalink
fix(admin-ui): pr code smells
Browse files Browse the repository at this point in the history
Signed-off-by: Jeet Viramgama <jviramgama5@gmail.com>
  • Loading branch information
jv18creator committed Nov 15, 2023
1 parent 008fc9c commit b0b8d1d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const PermissionAddDialogForm = ({ handler, modal, onAccept }) => {
...(defaultPermissionInToken !== undefined &&
defaultPermissionInToken !== '' && {
defaultPermissionInToken:
defaultPermissionInToken === 'true' ? true : false,
defaultPermissionInToken === 'true',
}),
}

Expand Down
12 changes: 12 additions & 0 deletions admin-ui/plugins/admin/components/Permissions/UiPermDetailPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react'
import { Container, Row, Col } from 'Components'
import GluuFormDetailRow from 'Routes/Apps/Gluu/GluuFormDetailRow'
import { PERMISSIONS } from 'Utils/ApiResources'
import PropTypes from 'prop-types'

function UiPermDetailPage({ row }) {
const { rowData } = row
Expand Down Expand Up @@ -66,4 +67,15 @@ function UiPermDetailPage({ row }) {
)
}

UiPermDetailPage.propTypes = {
row: PropTypes.shape({
rowData: PropTypes.shape({
description: PropTypes.string.isRequired,
permission: PropTypes.string.isRequired,
tag: PropTypes.string.isRequired,
defaultPermissionInToken: PropTypes.bool.isRequired,
})
})
}

export default UiPermDetailPage

0 comments on commit b0b8d1d

Please sign in to comment.