add no image placeholder

This commit is contained in:
Barry Gitarts 2019-08-23 08:38:28 -04:00 committed by Barry G
parent 69e3430215
commit 891d8163d2
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,34 @@
import React from 'react'
import { withStyles } from '@material-ui/core/styles'
import PhotoIcon from './icons/Photo.jsx'
const styles = theme => ({
theme,
main: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
background: 'rgba(147, 155, 161, 0.1)',
minHeight: '15em',
gridColumn: '1 / 13'
},
icon: {},
subText: {
color: '#939BA1',
fontSize: '0.9375rem'
}
})
function NoImage({ classes }){
return (
<div className={classes.main}>
<div className={classes.icon}>
<PhotoIcon />
</div>
<div className={classes.subText}>No image available</div>
</div>
)
}
export default withStyles(styles)(NoImage)

View File

@ -15,6 +15,7 @@ import IconTextField from '../base/IconTextField'
import Icon from '../base/icons/IconByName'
import { convertTokenAmountUsd } from '../../utils/prices'
import { setMediaType } from '../../utils/project'
import NoImage from '../base/NoImage'
const { addProject } = LiquidPledging.methods
@ -335,6 +336,7 @@ const SubmissionSection = ({ classes, history }) => {
onBlur={handleBlur}
value={values.media || ''}
/>
<NoImage />
{status && status.showPreview &&
<div className={classnames(classes.markdown, fullWidth)}>
<div