Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
saanobhaai committed Nov 3, 2023
2 parents 2045492 + 7e982fa commit bc95404
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions src/components/MermaidDash.js
Original file line number Diff line number Diff line change
Expand Up @@ -408,9 +408,9 @@ class MermaidDash extends Component {

getSampleEventBenthicHardCoralAverages = sampleUnits => {
return sampleUnits.map(({ benthiclit, benthicpit, benthicpqt }) => {
const benthicLITCover = benthiclit && benthiclit.percent_cover_by_benthic_category_avg
const benthicPITCover = benthicpit && benthicpit.percent_cover_by_benthic_category_avg
const benthicPQTCover = benthicpqt && benthicpqt.percent_cover_by_benthic_category_avg
const benthicLITCover = benthiclit && benthiclit.percent_cover_benthic_category_avg
const benthicPITCover = benthicpit && benthicpit.percent_cover_benthic_category_avg
const benthicPQTCover = benthicpqt && benthicpqt.percent_cover_benthic_category_avg

if (benthicLITCover || benthicPITCover || benthicPQTCover) {
const benthicLITHardCoral = benthicLITCover && benthicLITCover['Hard coral']
Expand Down
4 changes: 2 additions & 2 deletions src/components/SampleUnitChartSubHeading.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ const SampleUnitChartSubHeading = ({
sampleUnit === BENTHIC_PIT_SAMPLE_UNIT ||
sampleUnit === BENTHIC_PHOTO_QUADRAT_SAMPLE_UNIT
) {
const { sample_unit_count, percent_cover_by_benthic_category_avg } = sampleUnitProperties
const { sample_unit_count, percent_cover_benthic_category_avg } = sampleUnitProperties

return (
<>
<SubHeadingText propertyName="Sample units" propertyInfo={sample_unit_count} />
<SubHeadingText
propertyName="Hard coral cover"
propertyInfo={percent_cover_by_benthic_category_avg['Hard coral']}
propertyInfo={percent_cover_benthic_category_avg['Hard coral']}
unit="%"
/>
</>
Expand Down
8 changes: 4 additions & 4 deletions src/constants/sample-unit-information.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ export const bleachingCategories = [
{ type: 'percent_bleached_avg', name: 'Bleached & Recently Dead' },
]
export const chartContentProperties = {
[BENTHIC_LIT_SAMPLE_UNIT]: 'percent_cover_by_benthic_category_avg',
[BENTHIC_PIT_SAMPLE_UNIT]: 'percent_cover_by_benthic_category_avg',
[BENTHIC_PHOTO_QUADRAT_SAMPLE_UNIT]: 'percent_cover_by_benthic_category_avg',
[FISHBELT_SAMPLE_UNIT]: 'biomass_kgha_by_trophic_group_avg',
[BENTHIC_LIT_SAMPLE_UNIT]: 'percent_cover_benthic_category_avg',
[BENTHIC_PIT_SAMPLE_UNIT]: 'percent_cover_benthic_category_avg',
[BENTHIC_PHOTO_QUADRAT_SAMPLE_UNIT]: 'percent_cover_benthic_category_avg',
[FISHBELT_SAMPLE_UNIT]: 'biomass_kgha_trophic_group_avg',
[BLEACHING_PROPERTY_QUADRAT_BENTHIC_PERCENT]: 'quadrat_benthic_percent',
}

Expand Down
4 changes: 2 additions & 2 deletions src/lib/mermaidDataPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const bleachingPropType = PropTypes.shape({
export const fishbeltPropType = PropTypes.shape({
sample_unit_count: PropTypes.number,
biomass_kgha_avg: PropTypes.number,
biomass_kgha_by_trophic_group_avg: PropTypes.shape({
biomass_kgha_trophic_group_avg: PropTypes.shape({
'herbivore-detritivore': PropTypes.number,
'herbivore-macroalgae': PropTypes.number,
'invertivore-mobile': PropTypes.number,
Expand All @@ -61,7 +61,7 @@ export const fishbeltPropType = PropTypes.shape({
})

export const benthicPitPropType = PropTypes.shape({
percent_cover_by_benthic_category_avg: PropTypes.shape({
percent_cover_benthic_category_avg: PropTypes.shape({
'Bare substrate': PropTypes.number,
'Crustose coralline algae': PropTypes.number,
Cyanobacteria: PropTypes.number,
Expand Down

0 comments on commit bc95404

Please sign in to comment.