drinkingvideogames/mixer

View on GitHub
src/components/admin/modals/new-game.jsx

Summary

Maintainability
D
1 day
Test Coverage

Showing 7 of 7 total issues

Function render has 64 lines of code (exceeds 25 allowed). Consider refactoring.
Open

render () {
const iconImage = this.input['iconImage']
const image = this.input['image']
const iconDrop = iconImage && iconImage.preview
? <img className='image-preview' src={iconImage.preview} />
Severity: Major
Found in src/components/admin/modals/new-game.jsx - About 2 hrs to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    <div className='input-field col s12 m6'>
    <input placeholder='/game/:slug' id='game_slug' type='text' className='validate' ref={node => {
    this.input.gameUrl = node
    }} />
    <label htmlFor='game_slug'>Game Slug</label>
    Severity: Major
    Found in src/components/admin/modals/new-game.jsx and 1 other location - About 2 hrs to fix
    src/components/admin/modals/new-game.jsx on lines 43..48

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    <div className='input-field col s12 m6'>
    <input placeholder='Game Name' id='game_name' type='text' className='validate' ref={node => {
    this.input.gameName = node
    }} />
    <label htmlFor='game_name'>Game Name</label>
    Severity: Major
    Found in src/components/admin/modals/new-game.jsx and 1 other location - About 2 hrs to fix
    src/components/admin/modals/new-game.jsx on lines 49..54

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    <div className='col s12 m6'>
    <Dropzone style={dropStyles} onDrop={this.onDrop.bind(this, 'image')} multiple={false} accept={'image/*'}>
    {imageDrop}
    </Dropzone>
    </div>
    Severity: Major
    Found in src/components/admin/modals/new-game.jsx and 1 other location - About 2 hrs to fix
    src/components/admin/modals/new-game.jsx on lines 56..60

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    <div className='col s12 m6'>
    <Dropzone style={dropStyles} onDrop={this.onDrop.bind(this, 'iconImage')} multiple={false} accept={'image/*'}>
    {iconDrop}
    </Dropzone>
    </div>
    Severity: Major
    Found in src/components/admin/modals/new-game.jsx and 1 other location - About 2 hrs to fix
    src/components/admin/modals/new-game.jsx on lines 61..65

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const iconDrop = iconImage && iconImage.preview
    ? <img className='image-preview' src={iconImage.preview} />
    : <div className='image-preview'>Click or drop to upload Icon Image</div>
    Severity: Major
    Found in src/components/admin/modals/new-game.jsx and 1 other location - About 1 hr to fix
    src/components/admin/modals/new-game.jsx on lines 25..27

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    const imageDrop = image && image.preview
    ? <img className='image-preview' src={image.preview} />
    : <div className='image-preview'>Click or drop to upload Main Image</div>
    Severity: Major
    Found in src/components/admin/modals/new-game.jsx and 1 other location - About 1 hr to fix
    src/components/admin/modals/new-game.jsx on lines 22..24

    There are no issues that match your filters.

    Category
    Status