atlp-rwanda/hackers-ec-Fe

View on GitHub

Showing 262 of 262 total issues

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

                                <motion.form
                                    initial={{ y: '100%', opacity: 1 }}
                                    animate={{ y: '0%' }}
                                    transition={{ ease: 'easeOut', duration: 1 }}
                                    className=" flex w-full gap-5 py-3"
Severity: Major
Found in src/pages/ProductsPage.tsx and 1 other location - About 1 hr to fix
src/pages/LandingProduct.tsx on lines 99..139

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

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 UserProfileSideBox has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function UserProfileSideBox() {
    const location = useLocation();
    const [active, setActive] = useState(location.pathname);

    const handleClick = (path: string) => {
Severity: Minor
Found in src/components/UserProfileSideBox.tsx - About 1 hr to fix

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

                                                                <span className="font-medium line-clamp-1">
                                                                    {sale.soldProducts.name.length > 25
                                                                        ? `${sale.soldProducts.name.substring(0, 25)}...`
                                                                        : sale.soldProducts.name}
                                                                </span>
    Severity: Major
    Found in src/pages/dashboard/buyer/order/SingleOrders.tsx and 1 other location - About 1 hr to fix
    src/pages/dashboard/seller/wishlist/WishTableRow.tsx on lines 28..32

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

    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

                <td>
                    {wishes.product.name.length > 15
                        ? `${wishes.product.name.substring(0, 15)}...`
                        : wishes.product.name}
                </td>
    Severity: Major
    Found in src/pages/dashboard/seller/wishlist/WishTableRow.tsx and 1 other location - About 1 hr to fix
    src/pages/dashboard/buyer/order/SingleOrders.tsx on lines 122..126

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

    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

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

    const UserRedirectionInput = ({ text, otherStyles }: TextProps) => {
        return (
            <>
                <p className={otherStyles}>{text}</p>
            </>
    Severity: Major
    Found in src/components/Redirection/userRedirectionInput.tsx and 1 other location - About 1 hr to fix
    src/components/redirections/UserRedirectionInput.tsx on lines 6..12

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

    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

    const AllProvider = ({ children }: PropsWithChildren) => {
        return (
            <Provider store={store}>
                <BrowserRouter>{children}</BrowserRouter>
            </Provider>
    Severity: Major
    Found in src/utils/AllProvider.tsx and 1 other location - About 1 hr to fix
    src/AllProvider.tsx on lines 6..12

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

    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

    const AllProvider = ({ children }: PropsWithChildren) => {
        return (
            <Provider store={store}>
                <BrowserRouter>{children}</BrowserRouter>
            </Provider>
    Severity: Major
    Found in src/AllProvider.tsx and 1 other location - About 1 hr to fix
    src/utils/AllProvider.tsx on lines 6..12

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

    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

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

    const UserRedirectionInput = ({ text, otherStyles }: TextProps) => {
        return (
            <>
                <p className={otherStyles}>{text}</p>
            </>
    Severity: Major
    Found in src/components/redirections/UserRedirectionInput.tsx and 1 other location - About 1 hr to fix
    src/components/Redirection/userRedirectionInput.tsx on lines 6..12

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

    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

                        <Route element={<ProtectedRoutes roles={['BUYER']} />}>
                            <Route path="/carts" element={<Cart />} />
                        </Route>
    Severity: Major
    Found in src/routes/index.tsx and 1 other location - About 1 hr to fix
    src/routes/index.tsx on lines 97..99

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

    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

                        <Route element={<ProtectedRoutes roles={['BUYER']} />}>
                            <Route path="/orders/:id" element={<SingleOrders />} />
                        </Route>
    Severity: Major
    Found in src/routes/index.tsx and 1 other location - About 1 hr to fix
    src/routes/index.tsx on lines 84..86

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

    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 GetUser has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    const GetUser = (props: getUserType) => {
        const [currentPage, setCurrentPage] = useState(0);
        const [searchQuery, setSearchQuery] = useState('');
        const [butOverlay, setButOverlay] = useState('');
        const roles = useAppSelector((state) => state.allRoles?.data[0]);
    Severity: Minor
    Found in src/components/adminDashboard/getUser.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 DeleteProduct has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    const DeleteProduct = ({ item }: DeleteModalProps) => {
        const { isLoading: processing } = useAppSelector(
            (state) => state.deleteProduct,
        );
    
    
    Severity: Minor
    Found in src/components/cards/DeleteProduct.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 CategoriesForm has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    const CategoriesForm: React.FC<CategoriesFormProps> = ({
        categoryData,
        onClose,
    }) => {
        const { showErrorMessage, showSuccessMessage } = useToast();
    Severity: Minor
    Found in src/pages/dashboard/seller/categories/CategoriesForm.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 PaymentSuccess has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function PaymentSuccess() {
        const [searchParams] = useSearchParams();
        const sessionId = searchParams.get('sessionId')!;
        const payerId = searchParams.get('payerId')!;
        const dispatch = useAppDispatch();
    Severity: Minor
    Found in src/pages/PaymentSuccess.tsx - About 1 hr to fix

      Function onSubmit has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          const onSubmit: SubmitHandler<UpdateOrderFormValues> = async (data) => {
              try {
                  const resultAction = await dispatch(
                      updateOrder({
                          id: selectedSaleId ?? '',
      Severity: Minor
      Found in src/pages/dashboard/seller/Sales/UpdateOrderModal.tsx - About 1 hr to fix

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

                                <label className="flex flex-col font-semibold gap-3">
                                    Primary Address:
                                    <FormInput
                                        type="text"
                                        placeholder="Nyarugenge"
        Severity: Major
        Found in src/components/auth/ProfileUser.tsx and 10 other locations - About 1 hr to fix
        src/components/Layouts/UpdatePassword.tsx on lines 83..92
        src/components/Layouts/UpdatePassword.tsx on lines 93..102
        src/components/Layouts/UpdatePassword.tsx on lines 103..112
        src/components/auth/ProfileUser.tsx on lines 174..183
        src/components/auth/ProfileUser.tsx on lines 187..196
        src/components/auth/ProfileUser.tsx on lines 197..206
        src/components/auth/ProfileUser.tsx on lines 221..230
        src/components/auth/ProfileUser.tsx on lines 231..240
        src/components/auth/ProfileUser.tsx on lines 253..262
        src/components/auth/ProfileUser.tsx on lines 263..272

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

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

                                <label className="flex flex-col font-semibold gap-3 mb-10">
                                    Zip Code:
                                    <FormInput
                                        type="text"
                                        placeholder="0000"
        Severity: Major
        Found in src/components/auth/ProfileUser.tsx and 10 other locations - About 1 hr to fix
        src/components/Layouts/UpdatePassword.tsx on lines 83..92
        src/components/Layouts/UpdatePassword.tsx on lines 93..102
        src/components/Layouts/UpdatePassword.tsx on lines 103..112
        src/components/auth/ProfileUser.tsx on lines 174..183
        src/components/auth/ProfileUser.tsx on lines 187..196
        src/components/auth/ProfileUser.tsx on lines 197..206
        src/components/auth/ProfileUser.tsx on lines 221..230
        src/components/auth/ProfileUser.tsx on lines 231..240
        src/components/auth/ProfileUser.tsx on lines 243..252
        src/components/auth/ProfileUser.tsx on lines 253..262

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

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

                                <label className="flex flex-col font-semibold mt-2 gap-3">
                                    Confirm Password:
                                    <FormInput
                                        type="password"
                                        placeholder="***********."
        Severity: Major
        Found in src/components/Layouts/UpdatePassword.tsx and 10 other locations - About 1 hr to fix
        src/components/Layouts/UpdatePassword.tsx on lines 83..92
        src/components/Layouts/UpdatePassword.tsx on lines 93..102
        src/components/auth/ProfileUser.tsx on lines 174..183
        src/components/auth/ProfileUser.tsx on lines 187..196
        src/components/auth/ProfileUser.tsx on lines 197..206
        src/components/auth/ProfileUser.tsx on lines 221..230
        src/components/auth/ProfileUser.tsx on lines 231..240
        src/components/auth/ProfileUser.tsx on lines 243..252
        src/components/auth/ProfileUser.tsx on lines 253..262
        src/components/auth/ProfileUser.tsx on lines 263..272

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

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

                                <label className="flex flex-col font-semibold mt-2 gap-3">
                                    New Password:
                                    <FormInput
                                        type="password"
                                        placeholder="***********."
        Severity: Major
        Found in src/components/Layouts/UpdatePassword.tsx and 10 other locations - About 1 hr to fix
        src/components/Layouts/UpdatePassword.tsx on lines 83..92
        src/components/Layouts/UpdatePassword.tsx on lines 103..112
        src/components/auth/ProfileUser.tsx on lines 174..183
        src/components/auth/ProfileUser.tsx on lines 187..196
        src/components/auth/ProfileUser.tsx on lines 197..206
        src/components/auth/ProfileUser.tsx on lines 221..230
        src/components/auth/ProfileUser.tsx on lines 231..240
        src/components/auth/ProfileUser.tsx on lines 243..252
        src/components/auth/ProfileUser.tsx on lines 253..262
        src/components/auth/ProfileUser.tsx on lines 263..272

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

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

                                <label className="flex flex-col font-semibold gap-3">
                                    Birth Date:
                                    <FormInput
                                        type="date"
                                        placeholder="10/10/23"
        Severity: Major
        Found in src/components/auth/ProfileUser.tsx and 10 other locations - About 1 hr to fix
        src/components/Layouts/UpdatePassword.tsx on lines 83..92
        src/components/Layouts/UpdatePassword.tsx on lines 93..102
        src/components/Layouts/UpdatePassword.tsx on lines 103..112
        src/components/auth/ProfileUser.tsx on lines 174..183
        src/components/auth/ProfileUser.tsx on lines 197..206
        src/components/auth/ProfileUser.tsx on lines 221..230
        src/components/auth/ProfileUser.tsx on lines 231..240
        src/components/auth/ProfileUser.tsx on lines 243..252
        src/components/auth/ProfileUser.tsx on lines 253..262
        src/components/auth/ProfileUser.tsx on lines 263..272

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

        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