Skip to content

Instantly share code, notes, and snippets.

@mustmodify
Last active August 24, 2018 13:58
Show Gist options
  • Save mustmodify/de61fee6def0930972e35fe48a5af5e3 to your computer and use it in GitHub Desktop.
Save mustmodify/de61fee6def0930972e35fe48a5af5e3 to your computer and use it in GitHub Desktop.
import BiomarkerCard from './BiomarkerCardComponent';
const BiomarkersCard = ({biomarkers, tense} => {
if( biomarkers.length == 0 )
return null
else
{
return(
<div className="biomarkers">
{this.props.children}
{biomarkers.map(bm => this.renderBiomarker(bm, tense))}
</div>
)
}
};
<BiomarkersCard biomarkers={[...]}, tense={'present'}>
<h2>Here are your most recent data</h2>
</BiomarkersCard>
<BiomarkersCard biomarkers={[...]}, tense={'past'}>
<h2>Here are biomarkers we couldn't calculate based on your current data, but for which we have previous data.</h2>
</BiomarkersCard>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment