(Go: >> BACK << -|- >> HOME <<)

Skip to content

fix: transfer error when reset data in some cases

codefactor.io / CodeFactor failed Jun 1, 2023 in 26s

3 issues found. Autofix available.

Annotations

Check warning on line 660 in components/transfer/__tests__/index.test.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

components/transfer/__tests__/index.test.tsx#L660

Fragments should contain more than one child - otherwise, there’s no need for a Fragment at all. (react/jsx-no-useless-fragment)

Check warning on line 667 in components/transfer/__tests__/index.test.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

components/transfer/__tests__/index.test.tsx#L667

Do not define components during render. React will see a new component type on every render and destroy the entire subtree’s DOM nodes and state (https://reactjs.org/docs/reconciliation.html#elements-of-different-types). Instead, move this component definition out of the parent component “App” and pass data as props. If you want to allow component creation in props, set allowAsProps option to true. (react/no-unstable-nested-components)

Check warning on line 2 in components/transfer/__tests__/index.test.tsx

See this annotation in the file changed.

@codefactor-io codefactor-io / CodeFactor

components/transfer/__tests__/index.test.tsx#L2

All imports in the declaration are only used as types. Use `import type`. (@typescript-eslint/consistent-type-imports)