Skip to content

Commit

Permalink
Merge pull request #2362 from JohnDuprey/dev
Browse files Browse the repository at this point in the history
Update standard list on home page
  • Loading branch information
JohnDuprey authored Apr 24, 2024
2 parents d506067 + feead73 commit 7f189e4
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions src/views/home/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const Home = () => {
isFetching: isFetchingStandards,
} = useGenericGetRequestQuery({
path: '/api/ListStandards',
params: {},
params: { ShowConsolidated: true, TenantFilter: currentTenant.defaultDomainName },
})

const {
Expand Down Expand Up @@ -144,18 +144,9 @@ const Home = () => {
]

const filteredStandards = standards
.filter(
(p) => p.displayName === 'AllTenants' || p.displayName === currentTenant.defaultDomainName,
)
.flatMap((tenant) => {
return Object.keys(tenant.standards).map((standard, idx) => {
const standardDisplayname = allStandardsList.filter((p) => p.name.includes(standard))
return (
<li key={`${standard}-${tenant.displayName}-${idx}`}>
{standardDisplayname[0]?.label} ({tenant.displayName})
</li>
)
})
?.filter((p) => p.Settings.remediate === true)
.map((standard, idx) => {
return <li key={`${standard.Standard}-${idx}`}>{standard.Standard}</li>
})
return (
<>
Expand Down

0 comments on commit 7f189e4

Please sign in to comment.