atlp-rwanda/hackers-ec-Fe

View on GitHub

Showing 262 of 262 total issues

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

            if (isEditMode) {
                const res = await dispatch(
                    editReview({ reviewId, feedBack, ratings }),
                ).unwrap();
                dispatch(fetchReview(props.id || '')).unwrap();
Severity: Major
Found in src/components/Forms/ReviewForm.tsx and 1 other location - About 2 hrs to fix
src/components/Forms/ReviewForm.tsx on lines 57..63

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 84.

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

            } else {
                const res = await dispatch(
                    createReview({ productId, feedBack, ratings }),
                ).unwrap();
                dispatch(fetchReview(props.id || '')).unwrap();
Severity: Major
Found in src/components/Forms/ReviewForm.tsx and 1 other location - About 2 hrs to fix
src/components/Forms/ReviewForm.tsx on lines 51..57

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 84.

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

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

const ForgotPasswordForm = () => {
    const { isLoading } = useAppSelector((state) => state.forgotPassword);
    const dispatch = useAppDispatch();
    const { showSuccessMessage, showErrorMessage } = useToast();
    const navigate = useNavigate();
Severity: Major
Found in src/components/forgottonPassword/ForgottonPasswordForm.tsx - About 2 hrs to fix

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

                    <div className="h-[23rem] w-[100%] rounded-[24px] bg-primary-lightblue m-auto justify-start items-start text-start flex flex-col p-5 gap-5 text-neutral-white">
                        <img src={gift} alt="" className="h-20 w-20 object-contain" />
                        <h3 className="text-[20px]">Millions of business offerings</h3>
                        <p className="text-[14px]">
                            We offer millions of items to select Continuous promotions
    Severity: Major
    Found in src/pages/About.tsx and 7 other locations - About 2 hrs to fix
    src/pages/About.tsx on lines 64..71
    src/pages/About.tsx on lines 72..79
    src/pages/About.tsx on lines 80..86
    src/pages/About.tsx on lines 87..93
    src/pages/About.tsx on lines 94..101
    src/pages/About.tsx on lines 102..110
    src/pages/About.tsx on lines 111..118

    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 78.

    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 8 locations. Consider refactoring.
    Open

                    <div className="h-[23rem] w-full place-content-center rounded-[24px] bg-primary-lightblue m-auto justify-start items-start text-start flex flex-col p-5 gap-5 text-neutral-white">
                        <img src={quality} alt="" className="h-20 w-20 object-contain" />
                        <h3 className="text-[20px]">Assured quality and transactions</h3>
                        <p className="text-[14px]">
                            Ensure production quality from verified suppliers, with your orders
    Severity: Major
    Found in src/pages/About.tsx and 7 other locations - About 2 hrs to fix
    src/pages/About.tsx on lines 56..63
    src/pages/About.tsx on lines 72..79
    src/pages/About.tsx on lines 80..86
    src/pages/About.tsx on lines 87..93
    src/pages/About.tsx on lines 94..101
    src/pages/About.tsx on lines 102..110
    src/pages/About.tsx on lines 111..118

    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 78.

    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 8 locations. Consider refactoring.
    Open

                    <div className="h-[23rem] w-full place-content-center rounded-[24px] bg-primary-lightblue m-auto justify-start items-start text-start flex flex-col p-5 gap-5 text-neutral-white">
                        <img src={payment} alt="" className="h-20 w-20 object-contain" />
                        <h3 className="text-[20px]">Safe Payments</h3>
                        <p className="text-[14px]">
                            Pay with popular and secure payment methods that are acceptable
    Severity: Major
    Found in src/pages/About.tsx and 7 other locations - About 2 hrs to fix
    src/pages/About.tsx on lines 56..63
    src/pages/About.tsx on lines 64..71
    src/pages/About.tsx on lines 80..86
    src/pages/About.tsx on lines 87..93
    src/pages/About.tsx on lines 94..101
    src/pages/About.tsx on lines 102..110
    src/pages/About.tsx on lines 111..118

    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 78.

    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 8 locations. Consider refactoring.
    Open

                    <div className="h-[23rem] w-full place-content-center rounded-[24px] bg-primary-lightblue m-auto justify-start items-start text-start flex flex-col p-5 gap-5 text-neutral-white">
                        <img src={message} alt="" className="h-20 w-20 object-contain" />
                        <h3 className="text-[20px]">Public Live chat</h3>
                        <p className="text-[14px]">
                            Convenient online consultation and message to solve your problem.
    Severity: Major
    Found in src/pages/About.tsx and 7 other locations - About 2 hrs to fix
    src/pages/About.tsx on lines 56..63
    src/pages/About.tsx on lines 64..71
    src/pages/About.tsx on lines 72..79
    src/pages/About.tsx on lines 87..93
    src/pages/About.tsx on lines 94..101
    src/pages/About.tsx on lines 102..110
    src/pages/About.tsx on lines 111..118

    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 78.

    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 8 locations. Consider refactoring.
    Open

                    <div className="h-[23rem] w-full place-content-center rounded-[24px] bg-primary-lightblue m-auto justify-start items-start text-start flex flex-col p-5 gap-5 text-neutral-white">
                        <img src={world} alt="" className="h-20 w-20 object-contain" />
                        <h3 className="text-[20px]">Worldwide Delivery</h3>
                        <p className="text-[14px]">
                            Supported more than 10 countries. Register to get $ 10 coupons.
    Severity: Major
    Found in src/pages/About.tsx and 7 other locations - About 2 hrs to fix
    src/pages/About.tsx on lines 56..63
    src/pages/About.tsx on lines 64..71
    src/pages/About.tsx on lines 72..79
    src/pages/About.tsx on lines 80..86
    src/pages/About.tsx on lines 94..101
    src/pages/About.tsx on lines 102..110
    src/pages/About.tsx on lines 111..118

    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 78.

    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 8 locations. Consider refactoring.
    Open

                    <div className="h-[23rem] w-full place-content-center rounded-[24px] bg-primary-lightblue m-auto justify-start items-start text-start flex flex-col p-5 gap-5 text-neutral-white">
                        <img src={oneStep} alt="" className="h-20 w-20 object-contain" />
                        <h3 className="text-[20px]">One-stop trading solution</h3>
                        <p className="text-[14px]">
                            Order seamlessly from product/supplier search to order management,
    Severity: Major
    Found in src/pages/About.tsx and 7 other locations - About 2 hrs to fix
    src/pages/About.tsx on lines 56..63
    src/pages/About.tsx on lines 64..71
    src/pages/About.tsx on lines 72..79
    src/pages/About.tsx on lines 80..86
    src/pages/About.tsx on lines 87..93
    src/pages/About.tsx on lines 102..110
    src/pages/About.tsx on lines 111..118

    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 78.

    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 8 locations. Consider refactoring.
    Open

                    <div className="h-[23rem] w-full place-content-center rounded-[24px] bg-primary-lightblue m-auto justify-start items-start text-start flex flex-col p-5 gap-5 text-neutral-white">
                        <img src={benefits} alt="" className="h-20 w-20 object-contain" />
                        <h3 className="text-[20px]">Enjoy the benefits</h3>
                        <p className="text-[14px]">
                            Get curated benefits, such as exclusive discounts, enhanced
    Severity: Major
    Found in src/pages/About.tsx and 7 other locations - About 2 hrs to fix
    src/pages/About.tsx on lines 56..63
    src/pages/About.tsx on lines 64..71
    src/pages/About.tsx on lines 72..79
    src/pages/About.tsx on lines 80..86
    src/pages/About.tsx on lines 87..93
    src/pages/About.tsx on lines 94..101
    src/pages/About.tsx on lines 111..118

    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 78.

    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

                        <motion.div
                            initial={{ x: difference >= 0 ? '50%' : '-50%', opacity: 1 }}
                            animate={{ x: 0, opacity: 1 }}
                            transition={{ duration: 0.5, ease: 'easeInOut' }}
                            className="w-full h-full flex items-center justify-center flex-col gsp-4"
    Severity: Major
    Found in src/components/payment/PaymentToggleModel.tsx and 1 other location - About 2 hrs to fix
    src/components/payment/PaymentToggleModel.tsx on lines 200..241

    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 78.

    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

                        <motion.div
                            initial={{ x: difference >= 0 ? '50%' : '-50%', opacity: 1 }}
                            animate={{ x: 0, opacity: 1 }}
                            transition={{ duration: 0.5, ease: 'easeInOut' }}
                            className="flex flex-col items-center justify-center gap-4 w-full h-full"
    Severity: Major
    Found in src/components/payment/PaymentToggleModel.tsx and 1 other location - About 2 hrs to fix
    src/components/payment/PaymentToggleModel.tsx on lines 244..292

    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 78.

    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 8 locations. Consider refactoring.
    Open

                    <div className="h-[23rem] w-full place-content-center rounded-[24px] bg-primary-lightblue m-auto justify-start items-start text-start flex flex-col p-5 gap-5 text-neutral-white">
                        <img src={cart} alt="" className="h-20 w-20 object-contain" />
                        <h3 className="text-[20px]">Variety of products</h3>
                        <p className="text-[14px]">
                            Explore products and suppliers for your business from millions of
    Severity: Major
    Found in src/pages/About.tsx and 7 other locations - About 2 hrs to fix
    src/pages/About.tsx on lines 56..63
    src/pages/About.tsx on lines 64..71
    src/pages/About.tsx on lines 72..79
    src/pages/About.tsx on lines 80..86
    src/pages/About.tsx on lines 87..93
    src/pages/About.tsx on lines 94..101
    src/pages/About.tsx on lines 102..110

    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 78.

    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

    File editUserForm.tsx has 254 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /* eslint-disable react-hooks/exhaustive-deps */
    import { useEffect } from 'react';
    import { FaLessThan } from 'react-icons/fa';
    import { useNavigate } from 'react-router-dom';
    import { useAppDispatch, useAppSelector } from '../../redux/hooks/hooks';
    Severity: Minor
    Found in src/components/Forms/editUserForm.tsx - About 2 hrs to fix

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

                      <div>
                          <label htmlFor="" className="labels">
                              Product quantity:
                          </label>
                          <FormInput
      Severity: Major
      Found in src/components/Forms/AddProductForm.tsx and 3 other locations - About 2 hrs to fix
      src/components/Forms/AddProductForm.tsx on lines 145..156
      src/components/Forms/AddProductForm.tsx on lines 157..168
      src/components/Forms/AddProductForm.tsx on lines 208..219

      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 76.

      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

                          <div>
                              <label htmlFor="deliveryDate" className="block text-sm font-medium">
                                  Name:
                              </label>
                              <FormInput
      Severity: Major
      Found in src/pages/dashboard/seller/categories/CategoriesForm.tsx and 1 other location - About 2 hrs to fix
      src/pages/dashboard/seller/categories/CategoriesForm.tsx on lines 106..117

      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 76.

      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 4 locations. Consider refactoring.
      Open

                      <div>
                          <label htmlFor="" className="labels">
                              Product expiry date:
                          </label>
                          <FormInput
      Severity: Major
      Found in src/components/Forms/AddProductForm.tsx and 3 other locations - About 2 hrs to fix
      src/components/Forms/AddProductForm.tsx on lines 145..156
      src/components/Forms/AddProductForm.tsx on lines 157..168
      src/components/Forms/AddProductForm.tsx on lines 169..180

      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 76.

      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 4 locations. Consider refactoring.
      Open

                      <div>
                          <label htmlFor="" className="labels">
                              Product discount:
                          </label>
                          <FormInput
      Severity: Major
      Found in src/components/Forms/AddProductForm.tsx and 3 other locations - About 2 hrs to fix
      src/components/Forms/AddProductForm.tsx on lines 145..156
      src/components/Forms/AddProductForm.tsx on lines 169..180
      src/components/Forms/AddProductForm.tsx on lines 208..219

      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 76.

      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 5 locations. Consider refactoring.
      Open

                  <span className="flex items-center gap-3">
                      <p className="text-[12px]">2 star</p>
                      <Line
                          data-testid="star-rate-2"
                          percent={handlePRogressBarPercent(2)}
      Severity: Major
      Found in src/components/product/review/ratingModel.tsx and 4 other locations - About 2 hrs to fix
      src/components/product/review/ratingModel.tsx on lines 27..36
      src/components/product/review/ratingModel.tsx on lines 37..46
      src/components/product/review/ratingModel.tsx on lines 47..56
      src/components/product/review/ratingModel.tsx on lines 67..76

      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 76.

      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

                              <UserStatCard
                                  title="Total Buyers"
                                  totalAmount={data?.data?.NumberofBuyer?.count}
                                  numberOfItems={data?.data?.activeBuyers}
                                  color="bg-primary-lightblue"
      Severity: Major
      Found in src/components/adminDashboard/AdminStat.tsx and 1 other location - About 2 hrs to fix
      src/components/adminDashboard/AdminStat.tsx on lines 54..61

      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 76.

      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