File ProjectFormBody.js
has 340 lines of code (exceeds 250 allowed). Consider refactoring.
import React, { useState } from 'react';
import Privacy from './Privacy';
import DeleteProjectModal from './DeleteProjectModal';
Function LoginBar
has 127 lines of code (exceeds 50 allowed). Consider refactoring.
const LoginBar = () => {
const { loginWithRedirect } = useAuth0();
const startLight = localStorage.getItem('theme') === 'light';
const [light, setLight] = useState(startLight);
const [show, setShow] = useState(false);
Function ProjectFromBody
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
const ProjectFromBody = ({
isEditing,
project,
projectPhotos,
userData,
Function OnboardingForm
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
const OnboardingForm = ({ history, isLoading }) => {
const [loadingPage, setLoadingPage] = useState(false);
const { logout, user } = useAuth0();
File ProfileTabs.js
has 313 lines of code (exceeds 250 allowed). Consider refactoring.
import React from 'react';
import { Link } from 'react-router-dom';
import { Tab, Tabs, TabList, TabPanel } from 'react-tabs';
import moment from 'moment';
import { v4 } from 'uuid';
Function Profile
has 99 lines of code (exceeds 50 allowed). Consider refactoring.
export default function Profile(props, users) {
const history = useHistory();
const { id } = useParams();
const { user } = useAuth0();
Function MultiImageUpload
has 79 lines of code (exceeds 50 allowed). Consider refactoring.
export function MultiImageUpload(props) {
const { files, setFiles } = props;
const {
isDragActive,
isDragReject,
Function Heatmap
has 75 lines of code (exceeds 50 allowed). Consider refactoring.
const Heatmap = (props) => {
const [today] = useState(new Date());
const heatmapArr = [];
const [days, setDays] = useState(-365);
const { width } = useWindowDimensions();
Function App
has 64 lines of code (exceeds 50 allowed). Consider refactoring.
export default function App() {
const { user, loading } = useAuth0();
const history = useHistory();
Function InviteModal
has 61 lines of code (exceeds 50 allowed). Consider refactoring.
const InviteModal = () => {
return (
<div className="modal--close">
<span className="modal--expand__background-overlay">
<div className="invite-modal">
Function ImageViewer
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
const ImageViewer = ({ projectImg, userData, projectData }) => {
const { isModal, toggleModal } = useModal();
const [activeImg, setActiveImg] = useState(null);
const changeImg = (imgObj) => {
if (activeImg === null || activeImg.id !== imgObj.id) {
Function TopBar
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
const TopBar = ({ searchData, getSearch }) => {
const { logout, user } = useAuth0();
const history = useHistory();
const { data: activeUser } = useQuery(GET_USER_BY_ID_QUERY, {
Function LoginBar
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
const LoginBar = () => {
const { loginWithRedirect } = useAuth0();
const startLight = localStorage.getItem('theme') === 'light';
const [light, setLight] = useState(startLight);
const [show, setShow] = useState(false);
Function TempComment
has 51 lines of code (exceeds 50 allowed). Consider refactoring.
export const TempComment = (props) => {
const [comment, setComment] = useState();
const { c } = this.props;
const { top, left } = c;
Function Step1
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
const Step1 = ({
alert,
formUser,
onChange,
showPrev,