Fix inconsistent React imports in JSX files (#2466)

This commit is contained in:
Claire 2023-11-15 12:52:30 +01:00 committed by GitHub
parent a97b722ad5
commit 9bbb0f13e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 4 additions and 23 deletions

View File

@ -1,5 +1,4 @@
import { useCallback, useState } from 'react'; import { useCallback, useState } from 'react';
import * as React from 'react';
import { TransitionMotion, spring } from 'react-motion'; import { TransitionMotion, spring } from 'react-motion';

View File

@ -1,5 +1,3 @@
import * as React from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
import { useHovering } from '../hooks/useHovering'; import { useHovering } from '../hooks/useHovering';

View File

@ -1,5 +1,4 @@
import { useRef, useEffect } from 'react'; import { memo, useRef, useEffect } from 'react';
import * as React from 'react';
import { decode } from 'blurhash'; import { decode } from 'blurhash';
@ -44,6 +43,6 @@ const Blurhash: React.FC<Props> = ({
); );
}; };
const MemoizedBlurhash = React.memo(Blurhash); const MemoizedBlurhash = memo(Blurhash);
export { MemoizedBlurhash as Blurhash }; export { MemoizedBlurhash as Blurhash };

View File

@ -1,5 +1,4 @@
import { useCallback } from 'react'; import { useCallback } from 'react';
import * as React from 'react';
import { defineMessages, useIntl } from 'react-intl'; import { defineMessages, useIntl } from 'react-intl';

View File

@ -1,5 +1,4 @@
import { useCallback, useState } from 'react'; import { useCallback, useState } from 'react';
import * as React from 'react';
interface Props { interface Props {
src: string; src: string;

View File

@ -1,5 +1,3 @@
import * as React from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
interface Props extends React.HTMLAttributes<HTMLImageElement> { interface Props extends React.HTMLAttributes<HTMLImageElement> {

View File

@ -1,4 +1,4 @@
import * as React from 'react'; import { PureComponent } from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
@ -33,7 +33,7 @@ interface States {
activate: boolean; activate: boolean;
deactivate: boolean; deactivate: boolean;
} }
export class IconButton extends React.PureComponent<Props, States> { export class IconButton extends PureComponent<Props, States> {
static defaultProps = { static defaultProps = {
size: 18, size: 18,
active: false, active: false,

View File

@ -1,5 +1,3 @@
import * as React from 'react';
import { Icon } from './icon'; import { Icon } from './icon';
const formatNumber = (num: number): number | string => (num > 40 ? '40+' : num); const formatNumber = (num: number): number | string => (num > 40 ? '40+' : num);

View File

@ -1,5 +1,3 @@
import * as React from 'react';
import { FormattedMessage } from 'react-intl'; import { FormattedMessage } from 'react-intl';
export const NotSignedInIndicator: React.FC = () => ( export const NotSignedInIndicator: React.FC = () => (

View File

@ -1,5 +1,3 @@
import * as React from 'react';
import classNames from 'classnames'; import classNames from 'classnames';
interface Props { interface Props {

View File

@ -1,5 +1,4 @@
import { useCallback, useState } from 'react'; import { useCallback, useState } from 'react';
import * as React from 'react';
import classNames from 'classnames'; import classNames from 'classnames';

View File

@ -1,5 +1,3 @@
import * as React from 'react';
interface Props { interface Props {
width?: number | string; width?: number | string;
height?: number | string; height?: number | string;

View File

@ -1,5 +1,3 @@
import * as React from 'react';
import { FormattedMessage } from 'react-intl'; import { FormattedMessage } from 'react-intl';
interface Props { interface Props {