justsega/frontend-bootcamp-project-12

View on GitHub

Showing 7 of 16 total issues

Function AddModal has 61 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const AddModal = (props) => {
  const { closeModal, show } = props;
  const inputField = useRef();
  useEffect(() => {
    inputField.current.focus();
Severity: Major
Found in frontend/src/components/modals/add/AddModal.jsx - About 2 hrs to fix

    Function Messages has 38 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const Messages = () => {
      const { t } = useTranslation();
      const username = useAuth().getUserName();
      const { activeChannelId } = useSelector((state) => state.channels);
      const activeChannel = useSelector(
    Severity: Minor
    Found in frontend/src/components/messages/Messages.jsx - About 1 hr to fix

      Function RemoveModal has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const RemoveModal = (props) => {
        const { closeModal, id } = props;
        const { t } = useTranslation();
        const dispatch = useDispatch();
        const socket = useSocket();
      Severity: Minor
      Found in frontend/src/components/modals/remove/RemoveModal.jsx - About 1 hr to fix

        Function LoginPage has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const LoginPage = () => {
          const { t } = useTranslation();
          const navigate = useNavigate();
          const auth = useAuth();
          useEffect(() => {
        Severity: Minor
        Found in frontend/src/components/loginPage/LoginPage.jsx - About 1 hr to fix

          Function Channels has 32 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const Channels = () => {
            const channels = useSelector(selectors.selectAll);
            const { activeChannelId } = useSelector((state) => state.channels);
            return (
              <Col className="col-4 col-md-2 border-end px-0 bg-light flex-column h-100 d-flex">
          Severity: Minor
          Found in frontend/src/components/channels/Channels.jsx - About 1 hr to fix

            Function MainChatPage has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const MainChatPage = () => {
              const { t } = useTranslation();
              const dispatch = useDispatch();
              const auth = useAuth();
            
            
            Severity: Minor
            Found in frontend/src/components/MainChatPage.jsx - About 1 hr to fix

              Function SignUp has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const SignUp = () => {
                const { t } = useTranslation();
                const navigate = useNavigate();
                const auth = useAuth();
                const formik = useFormik({
              Severity: Minor
              Found in frontend/src/components/signUp/SignUp.jsx - About 1 hr to fix
                Severity
                Category
                Status
                Source
                Language