Daymorelah/PostIt

View on GitHub

Showing 68 of 68 total issues

Function HomePage has 141 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const HomePage = (props)=>{
return(
<div>
<div className="container-fluid" >
<div className="row">
Severity: Major
Found in client/src/components/homeComponents/homePage.jsx - About 5 hrs to fix

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

    <div className="navbar-header">
    <button type="button" className="navbar-toggle"
    data-toggle="collapse" data-target="#myNavbar">
    <span className="icon-bar"></span>
    <span className="icon-bar"></span>
    Severity: Major
    Found in client/src/components/loginComponents/loginPage.jsx and 2 other locations - About 4 hrs to fix
    client/src/components/app.jsx on lines 12..19
    client/src/components/signUpComponents/signUpPage.jsx on lines 23..30

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

    <div className="navbar-header">
    <button type="button" className="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
    <span className="icon-bar"></span>
    <span className="icon-bar"></span>
    <span className="icon-bar"></span>
    Severity: Major
    Found in client/src/components/app.jsx and 2 other locations - About 4 hrs to fix
    client/src/components/loginComponents/loginPage.jsx on lines 23..31
    client/src/components/signUpComponents/signUpPage.jsx on lines 23..30

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

    <div className="navbar-header">
    <button type="button" className="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
    <span className="icon-bar"></span>
    <span className="icon-bar"></span>
    <span className="icon-bar"></span>
    Severity: Major
    Found in client/src/components/signUpComponents/signUpPage.jsx and 2 other locations - About 4 hrs to fix
    client/src/components/app.jsx on lines 12..19
    client/src/components/loginComponents/loginPage.jsx on lines 23..31

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

    list(req, res) {
    return userModel.all({attributes:['username','email'],
    include:[{
    model: groupModel,
    as: 'groupsForThisUser',
    Severity: Major
    Found in server/controllers/users.js and 1 other location - About 3 hrs to fix
    server/controllers/groups.js on lines 49..60

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

    listUsers(req, res) {
    return groupModel.all({
    attributes:['groupName', 'discription'],
    include: [{
    model: userModel,
    Severity: Major
    Found in server/controllers/groups.js and 1 other location - About 3 hrs to fix
    server/controllers/users.js on lines 70..80

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

    <div className='form-group'>
    <label htmlFor='password' className="control-label col-sm-4 ">Password </label>
    <div className="col-sm-6">
    <input type='password' id='pwd' className='form-control' placeholder="Enter password"
    ref={ (node) => passWord = node }/>
    Severity: Major
    Found in client/src/components/signUpComponents/signUpForm.jsx and 2 other locations - About 3 hrs to fix
    client/src/components/signUpComponents/signUpForm.jsx on lines 26..32
    client/src/components/signUpComponents/signUpForm.jsx on lines 42..48

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

    <div className='form-group'>
    <label htmlFor='username' className="control-label col-sm-4">Username </label>
    <div className="col-sm-6 ">
    <input type='text' id='username' className='form-control' placeholder=" Enter username"
    ref={ (node) => userName = node }/>
    Severity: Major
    Found in client/src/components/signUpComponents/signUpForm.jsx and 2 other locations - About 3 hrs to fix
    client/src/components/signUpComponents/signUpForm.jsx on lines 34..40
    client/src/components/signUpComponents/signUpForm.jsx on lines 42..48

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

    <div className='form-group'>
    <label htmlFor='email' className="control-label col-sm-4 ">Email </label>
    <div className="col-sm-6">
    <input type='email' id='email' className='form-control' placeholder="Enter email"
    ref={ (node) => email = node }/>
    Severity: Major
    Found in client/src/components/signUpComponents/signUpForm.jsx and 2 other locations - About 3 hrs to fix
    client/src/components/signUpComponents/signUpForm.jsx on lines 26..32
    client/src/components/signUpComponents/signUpForm.jsx on lines 34..40

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

    export const getRegisteredUsers = ()=>{
    return (dispatch)=>{
    return Axios.get(getUsersUrl)
    .then( (responce)=>{
    console.log('the responce is ===> ', responce);
    Severity: Major
    Found in client/src/actions/homeActions.jsx and 1 other location - About 2 hrs to fix
    client/src/actions/groupActions.jsx on lines 16..24

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

    export const getCreatedGroups = ()=>{
    return (dispatch)=>{
    return Axios.get(getUsersUrl)
    .then( (responce)=>{
    console.log('the responce is ===> ', responce);
    Severity: Major
    Found in client/src/actions/groupActions.jsx and 1 other location - About 2 hrs to fix
    client/src/actions/homeActions.jsx on lines 16..24

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

    <div className="input-group input-group-lg col-md-6 col-md-offset-3">
    <span className="input-group-addon"><i className="glyphicon glyphicon-user"></i></span>
    <input type="text" className="form-control" placeholder="Username"
    ref={ (node)=> userName = node } />
    </div>
    Severity: Major
    Found in client/src/components/loginComponents/loginForm.jsx and 1 other location - About 2 hrs to fix
    client/src/components/loginComponents/loginForm.jsx on lines 25..29

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

    <div className="input-group input-group-lg col-md-6 col-md-offset-3">
    <span className="input-group-addon"><i className="glyphicon glyphicon-lock"></i></span>
    <input type="password" className="form-control" placeholder="Password"
    ref={ (node)=> password = node } />
    </div>
    Severity: Major
    Found in client/src/components/loginComponents/loginForm.jsx and 1 other location - About 2 hrs to fix
    client/src/components/loginComponents/loginForm.jsx on lines 19..23

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

    const SignUpResponce = (props)=>{
    if(props.responce[0].message){
    return <Redirect to='/home' />;
    }else{
    return(
    Severity: Major
    Found in client/src/components/signUpComponents/signUpResponce.jsx and 1 other location - About 2 hrs to fix
    client/src/components/loginComponents/loginResponce.jsx on lines 6..15

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

    const groupReducer = (state=[], action)=>{
    switch (action.type) {
    case 'GET_CREATED_GROUPS_SUCCESS':
    console.log('in group reducer action.numberOfgroups is ===> ', action.numberOfGroups);
    console.log('in group reducer action is ===> ', action);
    Severity: Major
    Found in client/src/reducers/groupReducer.jsx and 1 other location - About 2 hrs to fix
    client/src/reducers/homeReducer.jsx on lines 2..14

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

    const homeReducer = (state=[], action)=>{
    switch (action.type) {
    case 'GET_REGISTERED_USERS_SUCCESS':
    console.log('in reducer action.numberOfUsers is ===> ', action.numberOfUsers);
    console.log('in reducer action is ===> ', action);
    Severity: Major
    Found in client/src/reducers/homeReducer.jsx and 1 other location - About 2 hrs to fix
    client/src/reducers/groupReducer.jsx on lines 2..14

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

    const LoginResponce = (props)=>{
    if(props.responce[0].message){
    return <Redirect to='/home' />;
    }else{
    return(
    Severity: Major
    Found in client/src/components/loginComponents/loginResponce.jsx and 1 other location - About 2 hrs to fix
    client/src/components/signUpComponents/signUpResponce.jsx on lines 6..15

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

    <div className="modal-header">
    <button type="button" className="close"
    data-dismiss="modal">
    close <span className="glyphicon glyphicon-remove">
    </span></button>
    Severity: Major
    Found in client/src/components/homeComponents/homePage.jsx and 1 other location - About 2 hrs to fix
    client/src/components/homeComponents/homePage.jsx on lines 34..41

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

    <div className="modal-header">
    <button type="button" className="close"
    data-dismiss="modal">
    close <span className="glyphicon glyphicon-remove">
    </span></button>
    Severity: Major
    Found in client/src/components/homeComponents/homePage.jsx and 1 other location - About 2 hrs to fix
    client/src/components/homeComponents/homePage.jsx on lines 68..75

    Function signUpForm has 52 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const signUpForm = (props)=>{
    let formInput, userName, passWord, email = null;
    return(
    <div>
    <div className='container-fluid'>
    Severity: Major
    Found in client/src/components/signUpComponents/signUpForm.jsx - About 2 hrs to fix
      Severity
      Category
      Status
      Source
      Language