Lambda-School-Labs/refresh-fe

View on GitHub

Showing 50 of 117 total issues

Function 1 has 714 lines of code (exceeds 25 allowed). Consider refactoring.
Open

(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
// Generated by LiveScript 1.3.1
var presets, simpleStr, wrap, slice$ = [].slice, toString$ = {}.toString;
presets = require('./presets').presets;
simpleStr = function(arr){
Severity: Major
Found in public/loading-bar.js - About 3 days to fix

    File loading-bar.js has 807 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
    // Generated by LiveScript 1.3.1
    var presets, simpleStr, wrap, slice$ = [].slice, toString$ = {}.toString;
    presets = require('./presets').presets;
    simpleStr = function(arr){
    Severity: Major
    Found in public/loading-bar.js - About 1 day to fix

      File actions-user.js has 666 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import axios from "axios";
      import { axiosWithAuth } from "../../../helpers/axiosWithAuth";
      import history from "../../../helpers/history";
      
      export const FETCHING_START = "FETCHING_START";
      Severity: Major
      Found in src/views/private/actions/actions-user.js - About 1 day to fix

        Function reducer has 148 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function reducer(state = initialState, action) {
          switch (action.type) {
            case FETCH_ALL_USERS_LOADING:
              return {
                ...state,
        Severity: Major
        Found in src/views/private/reducers/reducers.js - About 5 hrs to fix

          Function reducer has 105 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function reducer(state = initialState, action) {
            console.log("action", action);
          
            switch (action.type) {
              case FETCHING_START:
          Severity: Major
          Found in src/views/private/reducers/reducer-user.js - About 4 hrs to fix

            Function EditTeam has 101 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            function EditTeam(props) {
              const modalStyle = {
                overlay: {
                  position: "fixed",
                  top: 0,
            Severity: Major
            Found in src/views/private/admin-leaderboard/editTeam.js - About 4 hrs to fix

              Function 2 has 90 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              },{"./presets":2}],2:[function(require,module,exports){
              // Generated by LiveScript 1.3.1
              var presets, out$ = typeof exports != 'undefined' && exports || this;
              out$.presets = presets = {
                rainbow: {
              Severity: Major
              Found in public/loading-bar.js - About 3 hrs to fix

                Function Dropdown has 86 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const Dropdown = (props) => {
                  const [dropdownOpen, setOpen] = useState(false);
                  const [avatar, setAvatar] = useState({
                    avatarImage: null
                  })

                  Function AddUser has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const AddUser = props => {
                    //hooks
                    const [member, setMember] = useState({
                      email: ""
                    });
                  Severity: Major
                  Found in src/views/private/admin-leaderboard/addUser.js - About 3 hrs to fix

                    Function Leaderboard has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const Leaderboard = (props) => {
                      const [render, setRender] = useState(false);
                    
                      //state for accordion function
                      const [teamIndex, setTeamIndex] = useState(null);
                    Severity: Major
                    Found in src/views/private/admin-leaderboard/leaderboard.js - About 3 hrs to fix

                      Function UserList has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const UserList = props => {
                          const [searchTerm, setSearchTerm] = useState("");
                          const [showNulls, setShowNulls] = useState(false);
                          const [update, setUpdate] = useState(false)
                          const [display, setDisplay] = useState(false)
                      Severity: Major
                      Found in src/views/private/user-list/user-list.js - About 3 hrs to fix

                        Function UserLogin has 79 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function UserLogin(props) {
                        
                            //adjusted the 'mode' argument from the default value of 'onSubmit' for the useForm hook, in order to allow live error changes as user types
                            const { register, handleSubmit, errors } = useForm({mode: 'onChange'});
                        
                        
                        Severity: Major
                        Found in src/components/Auth/UserLogin.js - About 3 hrs to fix

                          Function DeleteTeamButton has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const DeleteTeamButton = (props) => {
                            const [modalIsOpen, setModalIsOpen] = useState(false);
                          
                            const modalStyle = {
                              overlay: {
                          Severity: Major
                          Found in src/views/private/admin-leaderboard/deleteTeamButton.js - About 3 hrs to fix

                            Function UserSignUp has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function UserSignUp(props) {
                            
                                 //adjusted the 'mode' argument from the default value of 'onSubmit' for the useForm hook, in order to allow live error changes as user types
                                const {register, handleSubmit, errors, watch} = useForm({mode: 'onChange'});
                                
                            Severity: Major
                            Found in src/components/Auth/UserSignUp.js - About 3 hrs to fix

                              Function AddTeam has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function AddTeam(props) {
                              
                                  const [teamName, setTeamName] = useState({
                                      name: ''
                                  });
                              Severity: Major
                              Found in src/views/private/admin-leaderboard/addTeam.js - About 2 hrs to fix

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

                                ) => (dispatch) => {
                                  console.log("hit subtractWater");
                                  dispatch({ type: FETCHING_START });
                                
                                  //first GET the water metric, in order to know what the current water number is to decrease it by
                                Severity: Major
                                Found in src/views/private/actions/actions-user.js - About 2 hrs to fix

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

                                        handler: function(time, doTransition){
                                          var ref$, min, max, prec, dv, dt, dur, v, p, node, style, box, dir;
                                          doTransition == null && (doTransition = true);
                                          if (this.time.src == null) {
                                            this.time.src = time;
                                  Severity: Major
                                  Found in public/loading-bar.js - About 2 hrs to fix

                                    Function subtractBreaks has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    ) => (dispatch) => {
                                      dispatch({ type: FETCHING_START });
                                    
                                      //first GET the breaks metric, in order to know what the current breaks number is to decrease it by
                                      axiosWithAuth()
                                    Severity: Major
                                    Found in src/views/private/actions/actions-user.js - About 2 hrs to fix

                                      Function subtractExercise has 62 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      ) => (dispatch) => {
                                        dispatch({ type: FETCHING_START });
                                      
                                        //first GET the exercise metric, in order to know what the current exercise number is to decrease it by
                                        axiosWithAuth()
                                      Severity: Major
                                      Found in src/views/private/actions/actions-user.js - About 2 hrs to fix

                                        Function subtractSleep has 60 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        ) => (dispatch) => {
                                          dispatch({ type: FETCHING_START });
                                        
                                          //first GET the sleep metric, in order to know what the current sleep number is to decrease it by
                                          axiosWithAuth()
                                        Severity: Major
                                        Found in src/views/private/actions/actions-user.js - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language