Use type import for react FC

Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
grafixeyehero 2024-02-28 21:02:05 +03:00
parent 36c19ec39a
commit 533ae17767
45 changed files with 47 additions and 48 deletions

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import useCard from './useCard';
import CardWrapper from './CardWrapper';
import CardBox from './CardBox';

View File

@ -1,5 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import layoutManager from 'components/layoutManager';
import CardOverlayButtons from './CardOverlayButtons';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import classNames from 'classnames';
import { getDefaultBackgroundClass } from '../cardBuilderUtils';
import CardImageContainer from './CardImageContainer';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import Box from '@mui/material/Box';
import useCardText from './useCardText';
import layoutManager from 'components/layoutManager';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import Box from '@mui/material/Box';
import ButtonGroup from '@mui/material/ButtonGroup';
import classNames from 'classnames';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import Box from '@mui/material/Box';
import classNames from 'classnames';
import useIndicator from 'components/indicators/useIndicator';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import classNames from 'classnames';
import CardFooterText from './CardFooterText';
import type { ItemDto } from 'types/itemDto';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import classNames from 'classnames';
import { useApi } from 'hooks/useApi';
import { getCardLogoUrl } from './cardHelper';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import ButtonGroup from '@mui/material/ButtonGroup';
import classNames from 'classnames';
import { appRouter } from 'components/router/appRouter';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import Box from '@mui/material/Box';
import escapeHTML from 'escape-html';
import type { TextLine } from './cardHelper';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import layoutManager from 'components/layoutManager';
import type { DataAttributes } from 'types/dataAttributes';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import { setCardData } from '../cardBuilder';
import Card from './Card';
import type { ItemDto } from 'types/itemDto';

View File

@ -1,5 +1,5 @@
import { BaseItemKind } from '@jellyfin/sdk/lib/generated-client';
import React, { FC } from 'react';
import React, { type FC } from 'react';
import Icon from '@mui/material/Icon';
import imageHelper from 'utils/image';
import DefaultName from './DefaultName';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import Box from '@mui/material/Box';
import escapeHTML from 'escape-html';
import itemHelper from 'components/itemHelper';

View File

@ -1,4 +1,4 @@
import React, { FC, useCallback, useState } from 'react';
import React, { type FC, useCallback, useState } from 'react';
import { BlurhashCanvas } from 'react-blurhash';
import { LazyLoadImage } from 'react-lazy-load-image-component';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import IconButton from '@mui/material/IconButton';
import InfoIcon from '@mui/icons-material/Info';
import globalize from 'scripts/globalize';

View File

@ -1,5 +1,5 @@
import { BaseItemKind, ImageType } from '@jellyfin/sdk/lib/generated-client';
import React, { FC } from 'react';
import React, { type FC } from 'react';
import Image from './Image';
import DefaultIconText from './DefaultIconText';
import type { ItemDto } from 'types/itemDto';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import IconButton from '@mui/material/IconButton';
import MoreVertIcon from '@mui/icons-material/MoreVert';
import globalize from 'scripts/globalize';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';
import globalize from 'scripts/globalize';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import IconButton from '@mui/material/IconButton';
import PlayArrowIcon from '@mui/icons-material/PlayArrow';
import globalize from 'scripts/globalize';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import IconButton from '@mui/material/IconButton';
import PlaylistAddIcon from '@mui/icons-material/PlaylistAdd';
import globalize from 'scripts/globalize';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import IconButton from '@mui/material/IconButton';
interface RightIconButtonsProps {

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import useList from './useList';
import ListContent from './ListContent';
import ListWrapper from './ListWrapper';

View File

@ -1,5 +1,5 @@
import { BaseItemKind } from '@jellyfin/sdk/lib/generated-client';
import React, { FC } from 'react';
import React, { type FC } from 'react';
import DragHandleIcon from '@mui/icons-material/DragHandle';
import Box from '@mui/material/Box';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import Box from '@mui/material/Box';
interface ListContentWrapperProps {

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import Typography from '@mui/material/Typography';
interface ListGroupHeaderWrapperProps {

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import classNames from 'classnames';
import Box from '@mui/material/Box';
import { useApi } from 'hooks/useApi';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import classNames from 'classnames';
import Box from '@mui/material/Box';
import useListTextlines from './useListTextlines';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import Box from '@mui/material/Box';
import Typography from '@mui/material/Typography';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import { Box } from '@mui/material';
import itemHelper from '../../itemHelper';
import PlayedButton from 'elements/emby-playstatebutton/PlayedButton';

View File

@ -1,6 +1,6 @@
import classNames from 'classnames';
import escapeHTML from 'escape-html';
import React, { FC } from 'react';
import React, { type FC } from 'react';
import Box from '@mui/material/Box';
import Button from '@mui/material/Button';
import layoutManager from '../../layoutManager';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import escapeHTML from 'escape-html';
import { groupBy } from 'lodash-es';
import Box from '@mui/material/Box';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import classNames from 'classnames';
import ClosedCaptionIcon from '@mui/icons-material/ClosedCaption';
import Box from '@mui/material/Box';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import classNames from 'classnames';
import Box from '@mui/material/Box';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import classNames from 'classnames';
import Box from '@mui/material/Box';
import datetime from 'scripts/datetime';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import Box from '@mui/material/Box';
import classNames from 'classnames';
import type { MiscInfo } from 'types/mediaInfoItem';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import classNames from 'classnames';
import Box from '@mui/material/Box';
import usePrimaryMediaInfo from './usePrimaryMediaInfo';

View File

@ -1,4 +1,4 @@
import React, { FC } from 'react';
import React, { type FC } from 'react';
import classNames from 'classnames';
import StarIcon from '@mui/icons-material/Star';
import Box from '@mui/material/Box';

View File

@ -1,4 +1,4 @@
import React, { FC, useCallback, useEffect, useState } from 'react';
import React, { type FC, useCallback, useEffect, useState } from 'react';
import Events, { Event } from 'utils/events';
import serverNotifications from 'scripts/serverNotifications';
import classNames from 'classnames';

View File

@ -1,7 +1,7 @@
import type {
LibraryUpdateInfo
} from '@jellyfin/sdk/lib/generated-client';
import React, { FC, useCallback, useEffect, useRef } from 'react';
import React, { type FC, useCallback, useEffect, useRef } from 'react';
import classNames from 'classnames';
import Box from '@mui/material/Box';
import Sortable from 'sortablejs';
@ -19,7 +19,7 @@ import itemShortcuts from 'components/shortcuts';
import MultiSelect from 'components/multiSelect/multiSelect';
import loading from 'components/loading/loading';
import focusManager from 'components/focusManager';
import { ParentId } from 'types/library';
import type { ParentId } from 'types/library';
function disableEvent(e: MouseEvent) {
e.preventDefault();

View File

@ -1,6 +1,6 @@
import { BaseItemKind } from '@jellyfin/sdk/lib/generated-client';
import { useQueryClient } from '@tanstack/react-query';
import React, { FC, useCallback } from 'react';
import React, { type FC, useCallback } from 'react';
import CheckIcon from '@mui/icons-material/Check';
import { IconButton } from '@mui/material';
import classNames from 'classnames';

View File

@ -1,7 +1,7 @@
import React, { FC, useCallback, useEffect, useRef, useState } from 'react';
import { ProgressOptions } from 'types/progressOptions';
import React, { type FC, useCallback, useEffect, useRef, useState } from 'react';
import LinearProgress, { linearProgressClasses } from '@mui/material/LinearProgress';
import classNames from 'classnames';
import type { ProgressOptions } from 'types/progressOptions';
interface AutoTimeProgressBarProps {
pct: number;

View File

@ -1,4 +1,4 @@
import React, { FC, useCallback } from 'react';
import React, { type FC, useCallback } from 'react';
import { useQueryClient } from '@tanstack/react-query';
import FavoriteIcon from '@mui/icons-material/Favorite';
import { IconButton } from '@mui/material';

View File

@ -1,4 +1,4 @@
import React, { FC, useCallback, useEffect, useRef, useState } from 'react';
import React, { type FC, useCallback, useEffect, useRef, useState } from 'react';
import scrollerFactory from '../../libraries/scroller';
import globalize from '../../scripts/globalize';
import IconButton from '../emby-button/IconButton';

View File

@ -1,4 +1,4 @@
import React, { FC, useCallback, useEffect, useRef, useState } from 'react';
import React, { type FC, useCallback, useEffect, useRef, useState } from 'react';
import classNames from 'classnames';
import useElementSize from 'hooks/useElementSize';
import layoutManager from '../../components/layoutManager';