Skip to content

Commit

Permalink
Remove organisation array logic
Browse files Browse the repository at this point in the history
  • Loading branch information
barshathakuri authored and samshara committed Jan 12, 2024
1 parent 14cfdd5 commit 697c3f6
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function CountryNsOrganisationalCapacity() {

const { countryResponse } = useOutletContext<CountryOutletContext>();

const [organizationalCapacity] = countryResponse?.organizational_capacity ?? [];
const organizationalCapacity = countryResponse?.organizational_capacity;

return (
<Container
Expand All @@ -31,7 +31,7 @@ function CountryNsOrganisationalCapacity() {
withHeaderBorder
heading={strings.countryNsLeadershipCapacityLabel}
>
{organizationalCapacity.leadership_capacity}
{organizationalCapacity?.leadership_capacity}
</Container>
)}
{isDefined(organizationalCapacity?.youth_capacity) && (
Expand All @@ -41,7 +41,7 @@ function CountryNsOrganisationalCapacity() {
withHeaderBorder
heading={strings.countryNsYouthCapacityLabel}
>
{organizationalCapacity.youth_capacity}
{organizationalCapacity?.youth_capacity}
</Container>
)}
{isDefined(organizationalCapacity?.volunteer_capacity) && (
Expand All @@ -51,7 +51,7 @@ function CountryNsOrganisationalCapacity() {
withHeaderBorder
heading={strings.countryNsVolunteerCapacityLabel}
>
{organizationalCapacity.volunteer_capacity}
{organizationalCapacity?.volunteer_capacity}
</Container>
)}
{isDefined(organizationalCapacity?.financial_capacity) && (
Expand All @@ -61,7 +61,7 @@ function CountryNsOrganisationalCapacity() {
withHeaderBorder
heading={strings.countryNsFinancialCapacityLabel}
>
{organizationalCapacity.financial_capacity}
{organizationalCapacity?.financial_capacity}
</Container>
)}
</Container>
Expand Down

0 comments on commit 697c3f6

Please sign in to comment.