i'm trying to add background image on my page, but the image not showing. I a
i've tried Background image in inline style, but still not working. my page still empty
import React from 'react';
import PropTypes from 'prop-types';
import { withStyles } from '@material-ui/core/styles';
import Paper from '@material-ui/core/Paper';
import Grid from '@material-ui/core/Grid';
import Norway from '../image/norway_mist.jpg';
const imgUrl = '../image/norway_mist.jpg';
const styles = theme => ({
root: {
flexGrow: 1,
backgroundImage:'url(' + imgUrl + ')',
backgroundSize: 'cover',
overflow: 'hidden',
},
paper: {
padding: theme.spacing.unit * 2,
textAlign: 'center',
color: theme.palette.text.secondary,
},
});
function CenteredGrid(props) {
const { classes } = props;
return (
<div className={classes.root} style={{backgroundImage: 'url('+imgUrl+')'}}>
<Grid container spacing={24}>
<Grid item xs={12}>
</Grid>
</Grid>
</div>
);
}
CenteredGrid.propTypes = {
classes: PropTypes.object.isRequired,
};
export default withStyles(styles)(CenteredGrid);
Blockquote
Help me fix this