EscolaLMS/Front

View on GitHub

Showing 559 of 559 total issues

Function ProfileConsultations has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Open

const ProfileConsultations = ({ type }: ProfileConsultationsProps) => {
  const { userConsultations, fetchUserConsultations } =
    useContext(EscolaLMSContext);
  const { t } = useTranslation();
  const consultationsData = useMemo(
Severity: Minor
Found in src/components/Profile/ProfileConsultations/index.tsx - About 1 hr to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

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

const WebinarContent = () => {
  const { webinar } = useContext(EscolaLMSContext);
  const { t } = useTranslation();

  return (
Severity: Minor
Found in src/components/Webinars/Webinar/index.tsx - About 1 hr to fix

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

    export const ArrowDown = () => {
      return (
        <svg
          xmlns="http://www.w3.org/2000/svg"
          width="10.918"
    Severity: Minor
    Found in src/icons/index.tsx - About 1 hr to fix

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

      const EventAgenda = () => {
        const { stationaryEvent } = useContext(EscolaLMSContext);
        // TODO: fix this
      
        // eslint-disable-next-line @typescript-eslint/no-explicit-any
      Severity: Minor
      Found in src/components/Events/Event/EventAgenda/index.tsx - About 1 hr to fix

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

        const StyledPagination = styled.div`
          display: flex;
          justify-content: flex-start;
          align-items: center;
          a {
        Severity: Major
        Found in src/components/Common/Pagination/index.tsx and 5 other locations - About 1 hr to fix
        src/components/Common/TimeInfo/index.tsx on lines 5..23
        src/components/Courses/CoursesSlider/swiper.tsx on lines 11..38
        src/components/_App/Navbar/index.tsx on lines 202..212
        src/pages/register/index.tsx on lines 52..106
        src/pages/user/my-notifications.tsx on lines 10..40

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                      <Link className="single-link" to={routeRoutes.home}>
                        <Text size="16">{t<string>("Footer.HomePage")}</Text>
                      </Link>
        Severity: Major
        Found in src/components/_App/Footer/index.tsx and 5 other locations - About 1 hr to fix
        src/components/_App/Footer/index.tsx on lines 206..208
        src/components/_App/Footer/index.tsx on lines 210..212
        src/components/_App/Footer/index.tsx on lines 215..217
        src/components/_App/Footer/index.tsx on lines 218..220
        src/components/_App/Footer/index.tsx on lines 223..225

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                        <Link className="single-link" to={routeRoutes.myProfile}>
                          <Text size="16">{t<string>("Footer.UserProfile")}</Text>
                        </Link>
        Severity: Major
        Found in src/components/_App/Footer/index.tsx and 5 other locations - About 1 hr to fix
        src/components/_App/Footer/index.tsx on lines 203..205
        src/components/_App/Footer/index.tsx on lines 206..208
        src/components/_App/Footer/index.tsx on lines 215..217
        src/components/_App/Footer/index.tsx on lines 218..220
        src/components/_App/Footer/index.tsx on lines 223..225

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                      <Link className="single-link" to={routeRoutes.courses}>
                        <Text size="16">{t<string>("Footer.Courses")}</Text>
                      </Link>
        Severity: Major
        Found in src/components/_App/Footer/index.tsx and 5 other locations - About 1 hr to fix
        src/components/_App/Footer/index.tsx on lines 203..205
        src/components/_App/Footer/index.tsx on lines 210..212
        src/components/_App/Footer/index.tsx on lines 215..217
        src/components/_App/Footer/index.tsx on lines 218..220
        src/components/_App/Footer/index.tsx on lines 223..225

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                          <Link className="single-link" to={routeRoutes.login}>
                            <Text size="16">{t<string>("Header.Login")}</Text>
                          </Link>
        Severity: Major
        Found in src/components/_App/Footer/index.tsx and 5 other locations - About 1 hr to fix
        src/components/_App/Footer/index.tsx on lines 203..205
        src/components/_App/Footer/index.tsx on lines 206..208
        src/components/_App/Footer/index.tsx on lines 210..212
        src/components/_App/Footer/index.tsx on lines 218..220
        src/components/_App/Footer/index.tsx on lines 223..225

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

        const TimeInfoStyles = styled.div`
          display: flex;
          flex-direction: row;
          border: 1px solid ${({ theme }) => theme.primaryColor};
          border-radius: 2px;
        Severity: Major
        Found in src/components/Common/TimeInfo/index.tsx and 5 other locations - About 1 hr to fix
        src/components/Common/Pagination/index.tsx on lines 6..38
        src/components/Courses/CoursesSlider/swiper.tsx on lines 11..38
        src/components/_App/Navbar/index.tsx on lines 202..212
        src/pages/register/index.tsx on lines 52..106
        src/pages/user/my-notifications.tsx on lines 10..40

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

        const StyledContent = styled.div`
          background-color: ${({ theme }) => theme.gray4};
          padding-top: 100px;
          height: calc(100vh - 452px);
          @media (max-width: 991px) {
        Severity: Major
        Found in src/pages/register/index.tsx and 5 other locations - About 1 hr to fix
        src/components/Common/Pagination/index.tsx on lines 6..38
        src/components/Common/TimeInfo/index.tsx on lines 5..23
        src/components/Courses/CoursesSlider/swiper.tsx on lines 11..38
        src/components/_App/Navbar/index.tsx on lines 202..212
        src/pages/user/my-notifications.tsx on lines 10..40

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

        const NotificationsContainer = styled.div`
          padding-top: 70px;
          min-height: 50vh;
          padding-bottom: 50px;
          .notifications-drawer__content__header {
        Severity: Major
        Found in src/pages/user/my-notifications.tsx and 5 other locations - About 1 hr to fix
        src/components/Common/Pagination/index.tsx on lines 6..38
        src/components/Common/TimeInfo/index.tsx on lines 5..23
        src/components/Courses/CoursesSlider/swiper.tsx on lines 11..38
        src/components/_App/Navbar/index.tsx on lines 202..212
        src/pages/register/index.tsx on lines 52..106

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                          <Link className="single-link" to={routeRoutes.register}>
                            <Text size="16">{t<string>("Header.Register")}</Text>
                          </Link>
        Severity: Major
        Found in src/components/_App/Footer/index.tsx and 5 other locations - About 1 hr to fix
        src/components/_App/Footer/index.tsx on lines 203..205
        src/components/_App/Footer/index.tsx on lines 206..208
        src/components/_App/Footer/index.tsx on lines 210..212
        src/components/_App/Footer/index.tsx on lines 215..217
        src/components/_App/Footer/index.tsx on lines 223..225

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

              {
                id: 1,
                content: (
                  <IconText
                    icon={<IconSuccess />}
        src/components/Consultations/ConsultationTutorCard/Actions/index.tsx on lines 32..41

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

        const SwiperButtons = styled.div`
          position: absolute;
          top: 10px;
          right: 10px;
          display: flex;
        Severity: Major
        Found in src/components/Courses/CoursesSlider/swiper.tsx and 5 other locations - About 1 hr to fix
        src/components/Common/Pagination/index.tsx on lines 6..38
        src/components/Common/TimeInfo/index.tsx on lines 5..23
        src/components/_App/Navbar/index.tsx on lines 202..212
        src/pages/register/index.tsx on lines 52..106
        src/pages/user/my-notifications.tsx on lines 10..40

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                  {courseData.image_path && (
                    <div className="image-wrapper">
                      <ResponsiveImage
                        path={courseData.image_path}
                        srcSizes={[790 * 0.5, 790, 2 * 790]}
        src/components/Consultations/Consultation/ConsultationHero.tsx on lines 34..41

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                {consultation?.image_path && (
                  <div className="image-wrapper">
                    <ResponsiveImage
                      path={consultation.image_path}
                      srcSizes={[790 * 0.5, 790, 2 * 790]}
        src/pages/courses/course/Components/CourseMainInfo/index.tsx on lines 99..106

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

        const LastMobileMenuItem = styled.div`
          span {
            font-size: 13px;
            font-family: ${({ theme }) => theme.font};
            color: ${({ theme }) => theme.textColor};
        Severity: Major
        Found in src/components/_App/Navbar/index.tsx and 5 other locations - About 1 hr to fix
        src/components/Common/Pagination/index.tsx on lines 6..38
        src/components/Common/TimeInfo/index.tsx on lines 5..23
        src/components/Courses/CoursesSlider/swiper.tsx on lines 11..38
        src/pages/register/index.tsx on lines 52..106
        src/pages/user/my-notifications.tsx on lines 10..40

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

              {
                id: 2,
                content: (
                  <IconText
                    icon={<IconCircleError />}
        src/components/Consultations/ConsultationTutorCard/Actions/index.tsx on lines 22..31

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

                  <Button
                    mode={"primary"}
                    block
                    onClick={() => history.push(routeRoutes.login)}
                  >
        Severity: Major
        Found in src/components/_App/Navbar/index.tsx and 1 other location - About 1 hr to fix
        src/components/_App/Navbar/index.tsx on lines 337..343

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 56.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Severity
        Category
        Status
        Source
        Language