Commit 333011dd authored by Matija Obreza's avatar Matija Obreza
Browse files

Entry page: crops

parent 4882cdb4
...@@ -404,7 +404,11 @@ class WelcomePage extends React.Component<IWelcomeProps, any> { ...@@ -404,7 +404,11 @@ class WelcomePage extends React.Component<IWelcomeProps, any> {
<SectionHeader title={ t('public.p.welcome.cropList') } subTitle={ <Link to="/c">{ t('public.p.welcome.linkToAllCrops') }</Link> } /> <SectionHeader title={ t('public.p.welcome.cropList') } subTitle={ <Link to="/c">{ t('public.p.welcome.linkToAllCrops') }</Link> } />
{ crops && { crops &&
<GridContainer> <GridContainer>
{ crops.sort(() => Math.random() > 0.5 ? 1 : -1).slice(0, 6).sort((a, b) => a.name.localeCompare(b.name)).map((crop) => <CropCard xs={ 12 } sm={ 12 } md={ 4 } lg={ 4 } key={ crop.shortName } crop={ crop } compact />) } { crops.sort(() => Math.random() > 0.5 ? 1 : -1)
.slice(0, 6)
.sort((a, b) => a.name.localeCompare(b.name))
.map((crop) => <CropCard xs={ 12 } sm={ 12 } md={ 4 } lg={ 4 } xl={ 4 } key={ crop.shortName } crop={ crop } compact />)
}
</GridContainer> </GridContainer>
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment