Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Grid = props => {
const {
size: { width, height },
screenRatio,
rows,
cols,
displayGrid,
} = props
const { layout, saveLayout, selectPlugin, selectedPlugin } = props
const marginHeight = ReactGridLayout.defaultProps.margin[1]
const containerRatio = width / height
const gridWidth = containerRatio >= screenRatio ? screenRatio * height : width
const gridHeight = containerRatio >= screenRatio ? height : width / screenRatio
const rowHeight = (gridHeight - (rows + 1) * marginHeight) / rows
return (
<div>
{displayGrid ? (
<div style="{{">
{range(rows).map(i => (
<div>
{range(cols).map(j => (
<div>
))}
</div></div></div></div>