Skip to content

Commit 794abd1

Browse files
chore: removing unnecessary react imports part 5
1 parent 0d66aba commit 794abd1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+65
-81
lines changed

babel.config.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"presets": [
33
["@babel/preset-env", { "modules": false } ],
4-
["@babel/preset-react", { "useSpread": true } ],
4+
["@babel/preset-react", { "useSpread": true, "runtime": "automatic" } ],
55
"@babel/preset-typescript"
66
],
77
"env": {
88
"test": {
99
"presets": [
1010
["@babel/preset-env", {}],
11-
["@babel/preset-react", { "useSpread": true } ],
11+
["@babel/preset-react", { "useSpread": true, "runtime": "automatic" }],
1212
"@babel/preset-typescript"
1313
]
1414
}

src/Dropdown/Dropdown.test.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import {
32
render, screen, waitFor, act,
43
} from '@testing-library/react';

src/Dropdown/index.jsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from 'react';
1+
import { forwardRef, useState } from 'react';
22
import classNames from 'classnames';
33
import PropTypes from 'prop-types';
44
import BaseDropdown from 'react-bootstrap/Dropdown';
@@ -8,7 +8,7 @@ import BaseDropdownToggle from 'react-bootstrap/DropdownToggle';
88
import Button from '../Button';
99
import IconButton from '../IconButton';
1010

11-
const Dropdown = React.forwardRef(
11+
const Dropdown = forwardRef(
1212
// eslint-disable-next-line prefer-arrow-callback
1313
function Dropdown({
1414
show,
@@ -18,7 +18,7 @@ const Dropdown = React.forwardRef(
1818
className,
1919
...rest
2020
}, ref) {
21-
const [internalShow, setInternalShow] = React.useState(show);
21+
const [internalShow, setInternalShow] = useState(show);
2222
const isClosingPermitted = (source) => {
2323
// autoClose=false only permits close on button click
2424
if (autoClose === false) {
@@ -88,7 +88,7 @@ Dropdown.defaultProps = {
8888
variant: 'light',
8989
};
9090

91-
const DropdownToggle = React.forwardRef(
91+
const DropdownToggle = forwardRef(
9292
// eslint-disable-next-line prefer-arrow-callback
9393
function DropdownToggle({
9494
as,
@@ -116,7 +116,7 @@ DropdownToggle.defaultProps = {
116116
bsPrefix: 'dropdown-toggle',
117117
};
118118

119-
Dropdown.Item = React.forwardRef(
119+
Dropdown.Item = forwardRef(
120120
// eslint-disable-next-line prefer-arrow-callback
121121
function DropdownItem({ className, ...otherProps }, ref) {
122122
return (

src/Dropzone/DefaultContent.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import PropTypes from 'prop-types';
32
import { FormattedMessage, useIntl } from 'react-intl';
43
import { getTypesString, formatBytes } from './utils';

src/Dropzone/DragError.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import PropTypes from 'prop-types';
32

43
function DragError({ message }) {

src/Dropzone/GenericError.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import PropTypes from 'prop-types';
32
import Alert from '../Alert';
43
import { Info } from '../../icons';

src/Dropzone/UploadProgress.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import PropTypes from 'prop-types';
32
import { FormattedMessage } from 'react-intl';
43
import Button from '../Button';

src/Dropzone/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import { useState } from 'react';
22
import PropTypes from 'prop-types';
33
import classNames from 'classnames';
44
import { useDropzone, ErrorCode } from 'react-dropzone';

src/Dropzone/tests/DefaultContent.test.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import renderer from 'react-test-renderer';
32
import { IntlProvider } from 'react-intl';
43
import { render } from '@testing-library/react';

src/Dropzone/tests/DragError.test.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import React from 'react';
21
import { render } from '@testing-library/react';
32

43
import DragError from '../DragError';

0 commit comments

Comments
 (0)