Skip to content

Commit

Permalink
fix(admin-ui): filter records for spontaneous
Browse files Browse the repository at this point in the history
  • Loading branch information
mjatin-dev committed Aug 30, 2022
1 parent b4eef0f commit 957a227
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@ function ClientShowSpontaneousScopes({ handler, isOpen }) {
const scopesByCreator = useSelector(
(state) => state.scopeReducer.scopesByCreator,
)

const printableScopes = scopesByCreator.filter(
(item) => item.scopeType == 'spontaneous',
)
const theme = useContext(ThemeContext)
const selectedTheme = theme.state.theme

return (
<Modal isOpen={isOpen} toggle={handler} className="modal-outline-primary">
<ModalHeader>{t('fields.spontaneousScopes')}</ModalHeader>
<ModalBody>
{scopesByCreator.length > 0 ? (
scopesByCreator?.map((scope, key) => {
{printableScopes.length > 0 ? (
printableScopes?.map((scope, key) => {
return (
<div key={key}>
<Badge color={`primary-${selectedTheme}`}>{scope?.id}</Badge>
Expand Down

0 comments on commit 957a227

Please sign in to comment.