Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Genesys Website
Commits
62aaf065
Commit
62aaf065
authored
Nov 09, 2018
by
Oleksii Savran
Browse files
Added crops to entry page
parent
f0f6cd05
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ui/pages/welcome/index.tsx
View file @
62aaf065
...
...
@@ -19,6 +19,8 @@ import MailOutlineIcon from '@material-ui/icons/MailOutline';
import
BookmarkBorderIcon
from
'
@material-ui/icons/BookmarkBorder
'
;
import
PageLayout
from
'
ui/layout/PageLayout
'
;
import
Number
from
'
ui/common/Number
'
;
import
GridLayout
from
'
ui/layout/GridLayout
'
;
import
CropCard
from
'
crop/ui/c/CropCard
'
;
const
styles
=
(
theme
)
=>
({
/* tslint:disable */
...
...
@@ -235,7 +237,7 @@ class WelcomePage extends React.Component<any, any> {
}
public
render
()
{
const
{
classes
,
t
,
serverInfo
}
=
this
.
props
;
const
{
classes
,
t
,
serverInfo
,
crops
}
=
this
.
props
;
const
Stats
=
({
children
})
=>
(
<
div
className
=
{
classes
.
stats
}
>
...
...
@@ -432,6 +434,13 @@ share caracterization and evaluation information on material held in their colle
</
Grid
>
</
Grid
>
</
Grid
>
<
Grid
item
xs
=
{
12
}
>
{
crops
&&
<
GridLayout
style
=
{
{
width
:
'
auto
'
,
margin
:
'
8px 6px
'
}
}
>
{
crops
&&
crops
.
sort
((
a
,
b
)
=>
a
.
name
.
localeCompare
(
b
.
name
)).
map
((
crop
)
=>
<
CropCard
key
=
{
crop
.
shortName
}
crop
=
{
crop
}
compact
/>)
}
</
GridLayout
>
}
</
Grid
>
</
PageLayout
>
);
}
...
...
@@ -439,6 +448,7 @@ share caracterization and evaluation information on material held in their colle
const
mapStateToProps
=
(
state
)
=>
({
serverInfo
:
state
.
serverInfo
.
data
,
crops
:
state
.
crop
.
public
.
list
||
undefined
,
// accessToken: state.login.access_token,
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment