From 16545eec225ce942b55935019185a94e471fb93b Mon Sep 17 00:00:00 2001 From: Ryan Cohen Date: Fri, 19 Aug 2022 19:35:50 +0900 Subject: [PATCH] feat: tooltip foundation (#2950) * feat: add foundation for tooltips * fix: add lang * refactor: remove React import where no longer necessary --- .eslintrc.js | 1 + package.json | 1 + server/lib/email/openpgpEncrypt.ts | 5 ++- server/lib/notifications/agents/gotify.ts | 2 +- src/components/AppDataWarning/index.tsx | 1 - src/components/CollectionDetails/index.tsx | 3 +- src/components/Common/Accordion/index.tsx | 6 +-- src/components/Common/Alert/index.tsx | 1 - src/components/Common/Badge/index.tsx | 1 - src/components/Common/Button/index.tsx | 2 +- .../Common/ButtonWithDropdown/index.tsx | 12 ++---- src/components/Common/CachedImage/index.tsx | 2 +- src/components/Common/ConfirmButton/index.tsx | 2 +- src/components/Common/Header/index.tsx | 2 - src/components/Common/List/index.tsx | 1 - src/components/Common/ListView/index.tsx | 1 - .../Common/LoadingSpinner/index.tsx | 2 - src/components/Common/Modal/index.tsx | 8 ++-- src/components/Common/PageTitle/index.tsx | 1 - src/components/Common/PlayButton/index.tsx | 4 +- .../Common/ProgressCircle/index.tsx | 2 +- .../Common/SensitiveInput/index.tsx | 3 +- src/components/Common/SettingsTabs/index.tsx | 2 +- src/components/Common/SlideOver/index.tsx | 3 +- src/components/Common/Table/index.tsx | 1 - src/components/Common/Tooltip/index.tsx | 36 ++++++++++++++++ src/components/CompanyCard/index.tsx | 2 +- .../Discover/DiscoverMovieGenre/index.tsx | 1 - .../Discover/DiscoverMovieLanguage/index.tsx | 1 - src/components/Discover/DiscoverMovies.tsx | 1 - .../Discover/DiscoverNetwork/index.tsx | 1 - .../Discover/DiscoverStudio/index.tsx | 1 - src/components/Discover/DiscoverTv.tsx | 1 - .../Discover/DiscoverTvGenre/index.tsx | 1 - .../Discover/DiscoverTvLanguage/index.tsx | 1 - .../Discover/DiscoverTvUpcoming.tsx | 1 - .../Discover/MovieGenreList/index.tsx | 1 - .../Discover/MovieGenreSlider/index.tsx | 3 +- .../Discover/NetworkSlider/index.tsx | 1 - .../Discover/StudioSlider/index.tsx | 1 - src/components/Discover/Trending.tsx | 1 - src/components/Discover/TvGenreList/index.tsx | 1 - .../Discover/TvGenreSlider/index.tsx | 3 +- src/components/Discover/Upcoming.tsx | 1 - src/components/Discover/index.tsx | 2 +- src/components/DownloadBlock/index.tsx | 1 - src/components/ExternalLinkBlock/index.tsx | 1 - src/components/GenreCard/index.tsx | 2 +- src/components/IssueBlock/index.tsx | 2 +- .../IssueDetails/IssueComment/index.tsx | 2 +- .../IssueDetails/IssueDescription/index.tsx | 2 +- src/components/IssueDetails/index.tsx | 2 +- src/components/IssueList/IssueItem/index.tsx | 2 +- src/components/IssueList/index.tsx | 3 +- .../IssueModal/CreateIssueModal/index.tsx | 2 +- src/components/IssueModal/index.tsx | 1 - src/components/JSONEditor/index.tsx | 2 +- src/components/LanguageSelector/index.tsx | 2 +- .../Layout/LanguagePicker/index.tsx | 2 +- src/components/Layout/Notifications/index.tsx | 1 - src/components/Layout/SearchInput/index.tsx | 2 +- src/components/Layout/Sidebar/index.tsx | 5 +-- src/components/Layout/UserDropdown/index.tsx | 2 +- src/components/Layout/VersionStatus/index.tsx | 2 +- src/components/Layout/index.tsx | 3 +- src/components/Login/LocalLogin.tsx | 2 +- src/components/Login/index.tsx | 2 +- src/components/ManageSlideOver/index.tsx | 2 +- .../MediaSlider/ShowMoreCard/index.tsx | 2 +- src/components/MediaSlider/index.tsx | 2 +- .../MovieDetails/MovieCast/index.tsx | 2 +- .../MovieDetails/MovieCrew/index.tsx | 2 +- .../MovieDetails/MovieRecommendations.tsx | 2 +- src/components/MovieDetails/MovieSimilar.tsx | 2 +- src/components/MovieDetails/index.tsx | 43 +++++++++++++------ .../NotificationType/index.tsx | 1 - .../NotificationTypeSelector/index.tsx | 2 +- src/components/PWAHeader/index.tsx | 2 - src/components/PermissionEdit/index.tsx | 1 - src/components/PermissionOption/index.tsx | 1 - src/components/PersonCard/index.tsx | 2 +- src/components/PersonDetails/index.tsx | 2 +- src/components/PlexLoginButton/index.tsx | 2 +- src/components/RegionSelector/index.tsx | 2 +- src/components/RequestBlock/index.tsx | 2 +- src/components/RequestButton/index.tsx | 3 +- src/components/RequestCard/index.tsx | 2 +- .../RequestList/RequestItem/index.tsx | 2 +- src/components/RequestList/index.tsx | 3 +- .../RequestModal/AdvancedRequester/index.tsx | 2 +- .../RequestModal/CollectionRequestModal.tsx | 3 +- .../RequestModal/MovieRequestModal.tsx | 3 +- .../RequestModal/QuotaDisplay/index.tsx | 3 +- .../RequestModal/SearchByNameModal/index.tsx | 2 +- .../RequestModal/TvRequestModal.tsx | 3 +- src/components/RequestModal/index.tsx | 1 - .../ResetPassword/RequestResetLink.tsx | 2 +- src/components/ResetPassword/index.tsx | 2 +- src/components/Search/index.tsx | 1 - src/components/Settings/CopyButton.tsx | 2 +- src/components/Settings/LibraryItem.tsx | 1 - .../Notifications/NotificationsDiscord.tsx | 3 +- .../Notifications/NotificationsEmail.tsx | 3 +- .../NotificationsGotify/index.tsx | 2 +- .../NotificationsLunaSea/index.tsx | 3 +- .../NotificationsPushbullet/index.tsx | 3 +- .../NotificationsPushover/index.tsx | 3 +- .../NotificationsSlack/index.tsx | 3 +- .../Notifications/NotificationsTelegram.tsx | 3 +- .../NotificationsWebPush/index.tsx | 2 +- .../NotificationsWebhook/index.tsx | 2 +- src/components/Settings/RadarrModal/index.tsx | 3 +- .../Settings/SettingsAbout/Releases/index.tsx | 2 +- .../Settings/SettingsAbout/index.tsx | 2 +- .../Settings/SettingsJobsCache/index.tsx | 2 +- src/components/Settings/SettingsLayout.tsx | 1 - .../Settings/SettingsLogs/index.tsx | 3 +- src/components/Settings/SettingsMain.tsx | 2 +- .../Settings/SettingsNotifications.tsx | 2 +- src/components/Settings/SettingsPlex.tsx | 3 +- src/components/Settings/SettingsServices.tsx | 3 +- .../Settings/SettingsUsers/index.tsx | 2 +- src/components/Settings/SonarrModal/index.tsx | 3 +- src/components/Setup/LoginWithPlex.tsx | 2 +- src/components/Setup/SetupSteps.tsx | 1 - src/components/Setup/index.tsx | 2 +- src/components/Slider/index.tsx | 5 +-- src/components/StatusBadge/index.tsx | 1 - src/components/StatusChecker/index.tsx | 2 +- src/components/TitleCard/Placeholder.tsx | 2 - src/components/TitleCard/TmdbTitleCard.tsx | 1 - src/components/TitleCard/index.tsx | 2 +- src/components/Toast/index.tsx | 2 +- src/components/ToastContainer/index.tsx | 1 - src/components/Transition/index.tsx | 3 +- src/components/TvDetails/TvCast/index.tsx | 2 +- src/components/TvDetails/TvCrew/index.tsx | 2 +- .../TvDetails/TvRecommendations.tsx | 2 +- src/components/TvDetails/TvSimilar.tsx | 2 +- src/components/TvDetails/index.tsx | 3 +- src/components/UserList/BulkEditModal.tsx | 2 +- src/components/UserList/PlexImportModal.tsx | 3 +- src/components/UserList/index.tsx | 3 +- .../UserProfile/ProfileHeader/index.tsx | 2 +- .../UserGeneralSettings/index.tsx | 3 +- .../UserNotificationsDiscord.tsx | 2 +- .../UserNotificationsEmail.tsx | 2 +- .../UserNotificationsPushbullet.tsx | 2 +- .../UserNotificationsPushover.tsx | 2 +- .../UserNotificationsTelegram.tsx | 2 +- .../UserNotificationsWebPush.tsx | 2 +- .../UserNotificationSettings/index.tsx | 2 +- .../UserSettings/UserPasswordChange/index.tsx | 2 +- .../UserSettings/UserPermissions/index.tsx | 2 +- .../UserProfile/UserSettings/index.tsx | 2 +- src/components/UserProfile/index.tsx | 2 +- src/context/LanguageContext.tsx | 3 +- src/context/UserContext.tsx | 3 +- src/i18n/locale/en.json | 3 ++ src/pages/404.tsx | 2 +- src/pages/_app.tsx | 3 +- src/pages/_document.tsx | 1 - src/pages/_error.tsx | 2 +- src/pages/collection/[collectionId]/index.tsx | 2 +- .../discover/movies/genre/[genreId]/index.tsx | 1 - src/pages/discover/movies/genres.tsx | 1 - src/pages/discover/movies/index.tsx | 1 - .../movies/language/[language]/index.tsx | 1 - .../movies/studio/[studioId]/index.tsx | 1 - src/pages/discover/movies/upcoming.tsx | 1 - src/pages/discover/trending.tsx | 1 - .../discover/tv/genre/[genreId]/index.tsx | 1 - src/pages/discover/tv/genres.tsx | 1 - src/pages/discover/tv/index.tsx | 1 - .../discover/tv/language/[language]/index.tsx | 1 - .../discover/tv/network/[networkId]/index.tsx | 1 - src/pages/discover/tv/upcoming.tsx | 1 - src/pages/index.tsx | 1 - src/pages/issues/[issueId]/index.tsx | 2 +- src/pages/issues/index.tsx | 2 +- src/pages/login/index.tsx | 1 - src/pages/login/plex/loading.tsx | 1 - src/pages/movie/[movieId]/cast.tsx | 2 +- src/pages/movie/[movieId]/crew.tsx | 2 +- src/pages/movie/[movieId]/index.tsx | 2 +- src/pages/movie/[movieId]/recommendations.tsx | 1 - src/pages/movie/[movieId]/similar.tsx | 1 - src/pages/person/[personId]/index.tsx | 1 - src/pages/profile/index.tsx | 2 +- src/pages/profile/settings/index.tsx | 2 +- src/pages/profile/settings/main.tsx | 2 +- .../settings/notifications/discord.tsx | 2 +- .../profile/settings/notifications/email.tsx | 2 +- .../settings/notifications/pushbullet.tsx | 2 +- .../settings/notifications/pushover.tsx | 2 +- .../settings/notifications/telegram.tsx | 2 +- .../settings/notifications/webpush.tsx | 2 +- src/pages/profile/settings/password.tsx | 2 +- src/pages/profile/settings/permissions.tsx | 2 +- src/pages/requests/index.tsx | 1 - src/pages/resetpassword/[guid]/index.tsx | 1 - src/pages/resetpassword/index.tsx | 1 - src/pages/search.tsx | 1 - src/pages/settings/about.tsx | 2 +- src/pages/settings/index.tsx | 1 - src/pages/settings/jobs.tsx | 2 +- src/pages/settings/logs.tsx | 2 +- src/pages/settings/main.tsx | 1 - src/pages/settings/notifications/discord.tsx | 2 +- src/pages/settings/notifications/email.tsx | 2 +- src/pages/settings/notifications/gotify.tsx | 2 +- src/pages/settings/notifications/lunasea.tsx | 2 +- .../settings/notifications/pushbullet.tsx | 2 +- src/pages/settings/notifications/pushover.tsx | 2 +- src/pages/settings/notifications/slack.tsx | 2 +- src/pages/settings/notifications/telegram.tsx | 2 +- src/pages/settings/notifications/webhook.tsx | 2 +- src/pages/settings/notifications/webpush.tsx | 2 +- src/pages/settings/plex.tsx | 2 +- src/pages/settings/services.tsx | 2 +- src/pages/settings/users.tsx | 1 - src/pages/setup.tsx | 1 - src/pages/tv/[tvId]/cast.tsx | 2 +- src/pages/tv/[tvId]/crew.tsx | 2 +- src/pages/tv/[tvId]/index.tsx | 2 +- src/pages/tv/[tvId]/recommendations.tsx | 1 - src/pages/tv/[tvId]/similar.tsx | 1 - src/pages/users/[userId]/index.tsx | 2 +- src/pages/users/[userId]/requests.tsx | 2 +- src/pages/users/[userId]/settings/index.tsx | 2 +- src/pages/users/[userId]/settings/main.tsx | 2 +- .../settings/notifications/discord.tsx | 2 +- .../[userId]/settings/notifications/email.tsx | 2 +- .../settings/notifications/pushbullet.tsx | 2 +- .../settings/notifications/pushover.tsx | 2 +- .../settings/notifications/telegram.tsx | 2 +- .../settings/notifications/webpush.tsx | 2 +- .../users/[userId]/settings/password.tsx | 2 +- .../users/[userId]/settings/permissions.tsx | 2 +- src/pages/users/index.tsx | 1 - yarn.lock | 38 +++++++++++++++- 241 files changed, 315 insertions(+), 273 deletions(-) create mode 100644 src/components/Common/Tooltip/index.tsx diff --git a/.eslintrc.js b/.eslintrc.js index fd45e0aa9..733caf5b6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -7,6 +7,7 @@ module.exports = { 'plugin:jsx-a11y/recommended', 'plugin:react/recommended', 'plugin:react-hooks/recommended', + 'plugin:react/jsx-runtime', 'prettier', ], parserOptions: { diff --git a/package.json b/package.json index 9f3eb21bd..a7a2d1b3f 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,7 @@ "react-intersection-observer": "9.4.0", "react-intl": "6.0.5", "react-markdown": "8.0.3", + "react-popper-tooltip": "^4.4.2", "react-select": "5.4.0", "react-spring": "9.5.2", "react-toast-notifications": "2.5.1", diff --git a/server/lib/email/openpgpEncrypt.ts b/server/lib/email/openpgpEncrypt.ts index 585f870bf..6ccd135ea 100644 --- a/server/lib/email/openpgpEncrypt.ts +++ b/server/lib/email/openpgpEncrypt.ts @@ -27,7 +27,7 @@ class PGPEncryptor extends Transform { // just save the whole message _transform = ( - chunk: any, + chunk: Uint8Array, _encoding: BufferEncoding, callback: TransformCallback ): void => { @@ -185,6 +185,9 @@ class PGPEncryptor extends Transform { } export const openpgpEncrypt = (options: EncryptorOptions) => { + // Disabling this line because I don't want to fix it but I am tired + // of seeing the lint warning + // eslint-disable-next-line @typescript-eslint/no-explicit-any return function (mail: any, callback: () => unknown): void { if (!options.encryptionKeys.length) { setImmediate(callback); diff --git a/server/lib/notifications/agents/gotify.ts b/server/lib/notifications/agents/gotify.ts index c0e4024eb..9c082eed9 100644 --- a/server/lib/notifications/agents/gotify.ts +++ b/server/lib/notifications/agents/gotify.ts @@ -11,7 +11,7 @@ interface GotifyPayload { title: string; message: string; priority: number; - extras: any; + extras: Record; } class GotifyAgent diff --git a/src/components/AppDataWarning/index.tsx b/src/components/AppDataWarning/index.tsx index 1af8ea647..5f2b4f7ed 100644 --- a/src/components/AppDataWarning/index.tsx +++ b/src/components/AppDataWarning/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import Alert from '../Common/Alert'; diff --git a/src/components/CollectionDetails/index.tsx b/src/components/CollectionDetails/index.tsx index d2b72bd58..cf5990fce 100644 --- a/src/components/CollectionDetails/index.tsx +++ b/src/components/CollectionDetails/index.tsx @@ -2,7 +2,8 @@ import { DownloadIcon } from '@heroicons/react/outline'; import { uniq } from 'lodash'; import Link from 'next/link'; import { useRouter } from 'next/router'; -import React, { useState } from 'react'; + +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import { MediaStatus } from '../../../server/constants/media'; diff --git a/src/components/Common/Accordion/index.tsx b/src/components/Common/Accordion/index.tsx index 9b4415270..49187bd03 100644 --- a/src/components/Common/Accordion/index.tsx +++ b/src/components/Common/Accordion/index.tsx @@ -1,9 +1,9 @@ -import * as React from 'react'; +import type * as React from 'react'; import { useState } from 'react'; import AnimateHeight from 'react-animate-height'; export interface AccordionProps { - children: (args: AccordionChildProps) => React.ReactElement | null; + children: (args: AccordionChildProps) => JSX.Element; /** If true, only one accordion item can be open at any time */ single?: boolean; /** If true, at least one accordion item will always be open */ @@ -13,7 +13,7 @@ export interface AccordionProps { export interface AccordionChildProps { openIndexes: number[]; handleClick(index: number): void; - AccordionContent: any; + AccordionContent: typeof AccordionContent; } type AccordionContentProps = { diff --git a/src/components/Common/Alert/index.tsx b/src/components/Common/Alert/index.tsx index 550b0b3ad..1437f4235 100644 --- a/src/components/Common/Alert/index.tsx +++ b/src/components/Common/Alert/index.tsx @@ -3,7 +3,6 @@ import { InformationCircleIcon, XCircleIcon, } from '@heroicons/react/solid'; -import React from 'react'; interface AlertProps { title?: React.ReactNode; diff --git a/src/components/Common/Badge/index.tsx b/src/components/Common/Badge/index.tsx index eae0b7df5..0a138891c 100644 --- a/src/components/Common/Badge/index.tsx +++ b/src/components/Common/Badge/index.tsx @@ -1,5 +1,4 @@ import Link from 'next/link'; -import React from 'react'; interface BadgeProps { badgeType?: 'default' | 'primary' | 'danger' | 'warning' | 'success'; diff --git a/src/components/Common/Button/index.tsx b/src/components/Common/Button/index.tsx index 59196d16d..efe894954 100644 --- a/src/components/Common/Button/index.tsx +++ b/src/components/Common/Button/index.tsx @@ -1,5 +1,5 @@ -import type { ForwardedRef } from 'react'; import React from 'react'; +import type { ForwardedRef } from 'react'; export type ButtonType = | 'default' diff --git a/src/components/Common/ButtonWithDropdown/index.tsx b/src/components/Common/ButtonWithDropdown/index.tsx index 28a7a78f8..da5d80f43 100644 --- a/src/components/Common/ButtonWithDropdown/index.tsx +++ b/src/components/Common/ButtonWithDropdown/index.tsx @@ -1,10 +1,6 @@ import { ChevronDownIcon } from '@heroicons/react/solid'; -import type { - AnchorHTMLAttributes, - ButtonHTMLAttributes, - ReactNode, -} from 'react'; -import React, { useRef, useState } from 'react'; +import type { AnchorHTMLAttributes, ButtonHTMLAttributes } from 'react'; +import { useRef, useState } from 'react'; import useClickOutside from '../../../hooks/useClickOutside'; import { withProperties } from '../../../utils/typeHelpers'; import Transition from '../../Transition'; @@ -41,8 +37,8 @@ const DropdownItem = ({ interface ButtonWithDropdownProps extends ButtonHTMLAttributes { - text: ReactNode; - dropdownIcon?: ReactNode; + text: React.ReactNode; + dropdownIcon?: React.ReactNode; buttonType?: 'primary' | 'ghost'; } diff --git a/src/components/Common/CachedImage/index.tsx b/src/components/Common/CachedImage/index.tsx index 3c4533147..8372caba1 100644 --- a/src/components/Common/CachedImage/index.tsx +++ b/src/components/Common/CachedImage/index.tsx @@ -1,6 +1,6 @@ import type { ImageProps } from 'next/image'; import Image from 'next/image'; -import React from 'react'; + import useSettings from '../../../hooks/useSettings'; /** diff --git a/src/components/Common/ConfirmButton/index.tsx b/src/components/Common/ConfirmButton/index.tsx index 95dd3925a..7990ec042 100644 --- a/src/components/Common/ConfirmButton/index.tsx +++ b/src/components/Common/ConfirmButton/index.tsx @@ -1,4 +1,4 @@ -import React, { useRef, useState } from 'react'; +import { useRef, useState } from 'react'; import useClickOutside from '../../../hooks/useClickOutside'; import Button from '../Button'; diff --git a/src/components/Common/Header/index.tsx b/src/components/Common/Header/index.tsx index c949d4e6e..fb96e7010 100644 --- a/src/components/Common/Header/index.tsx +++ b/src/components/Common/Header/index.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - interface HeaderProps { extraMargin?: number; subtext?: React.ReactNode; diff --git a/src/components/Common/List/index.tsx b/src/components/Common/List/index.tsx index f98f0aa7e..de6010700 100644 --- a/src/components/Common/List/index.tsx +++ b/src/components/Common/List/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { withProperties } from '../../../utils/typeHelpers'; interface ListItemProps { diff --git a/src/components/Common/ListView/index.tsx b/src/components/Common/ListView/index.tsx index fea7ccf90..ff9013bb8 100644 --- a/src/components/Common/ListView/index.tsx +++ b/src/components/Common/ListView/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { useIntl } from 'react-intl'; import type { MovieResult, diff --git a/src/components/Common/LoadingSpinner/index.tsx b/src/components/Common/LoadingSpinner/index.tsx index 0a3802550..8f922ef38 100644 --- a/src/components/Common/LoadingSpinner/index.tsx +++ b/src/components/Common/LoadingSpinner/index.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - export const SmallLoadingSpinner = () => { return (
diff --git a/src/components/Common/Modal/index.tsx b/src/components/Common/Modal/index.tsx index 8a9efcdd4..c26416dc1 100644 --- a/src/components/Common/Modal/index.tsx +++ b/src/components/Common/Modal/index.tsx @@ -1,5 +1,5 @@ -import type { MouseEvent, ReactNode } from 'react'; -import React, { useRef } from 'react'; +import type { MouseEvent } from 'react'; +import { useRef } from 'react'; import ReactDOM from 'react-dom'; import { useIntl } from 'react-intl'; import useClickOutside from '../../../hooks/useClickOutside'; @@ -30,10 +30,10 @@ interface ModalProps { tertiaryButtonType?: ButtonType; disableScrollLock?: boolean; backgroundClickable?: boolean; - iconSvg?: ReactNode; + iconSvg?: React.ReactNode; loading?: boolean; backdrop?: string; - children?: ReactNode; + children?: React.ReactNode; } const Modal = ({ diff --git a/src/components/Common/PageTitle/index.tsx b/src/components/Common/PageTitle/index.tsx index 45a43e84b..ecaf74f7d 100644 --- a/src/components/Common/PageTitle/index.tsx +++ b/src/components/Common/PageTitle/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import useSettings from '../../../hooks/useSettings'; import Head from 'next/head'; diff --git a/src/components/Common/PlayButton/index.tsx b/src/components/Common/PlayButton/index.tsx index 8a08461c3..15164be29 100644 --- a/src/components/Common/PlayButton/index.tsx +++ b/src/components/Common/PlayButton/index.tsx @@ -1,5 +1,3 @@ -import type { ReactNode } from 'react'; -import React from 'react'; import ButtonWithDropdown from '../ButtonWithDropdown'; interface PlayButtonProps { @@ -9,7 +7,7 @@ interface PlayButtonProps { export interface PlayButtonLink { text: string; url: string; - svg: ReactNode; + svg: React.ReactNode; } const PlayButton = ({ links }: PlayButtonProps) => { diff --git a/src/components/Common/ProgressCircle/index.tsx b/src/components/Common/ProgressCircle/index.tsx index af8c2f2d4..7df2b041e 100644 --- a/src/components/Common/ProgressCircle/index.tsx +++ b/src/components/Common/ProgressCircle/index.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useRef } from 'react'; +import { useEffect, useRef } from 'react'; interface ProgressCircleProps { className?: string; diff --git a/src/components/Common/SensitiveInput/index.tsx b/src/components/Common/SensitiveInput/index.tsx index 8545c3532..78cdcaccb 100644 --- a/src/components/Common/SensitiveInput/index.tsx +++ b/src/components/Common/SensitiveInput/index.tsx @@ -1,6 +1,7 @@ import { EyeIcon, EyeOffIcon } from '@heroicons/react/solid'; import { Field } from 'formik'; -import React, { useState } from 'react'; + +import { useState } from 'react'; interface CustomInputProps extends React.ComponentProps<'input'> { as?: 'input'; diff --git a/src/components/Common/SettingsTabs/index.tsx b/src/components/Common/SettingsTabs/index.tsx index 8a68ec370..da69feda2 100644 --- a/src/components/Common/SettingsTabs/index.tsx +++ b/src/components/Common/SettingsTabs/index.tsx @@ -1,6 +1,6 @@ import Link from 'next/link'; import { useRouter } from 'next/router'; -import React from 'react'; + import type { Permission } from '../../../../server/lib/permissions'; import { hasPermission } from '../../../../server/lib/permissions'; import { useUser } from '../../../hooks/useUser'; diff --git a/src/components/Common/SlideOver/index.tsx b/src/components/Common/SlideOver/index.tsx index 40fd1b19a..05fa31742 100644 --- a/src/components/Common/SlideOver/index.tsx +++ b/src/components/Common/SlideOver/index.tsx @@ -1,6 +1,7 @@ /* eslint-disable jsx-a11y/click-events-have-key-events */ import { XIcon } from '@heroicons/react/outline'; -import React, { useEffect, useRef, useState } from 'react'; + +import { useEffect, useRef, useState } from 'react'; import ReactDOM from 'react-dom'; import { useLockBodyScroll } from '../../../hooks/useLockBodyScroll'; import Transition from '../../Transition'; diff --git a/src/components/Common/Table/index.tsx b/src/components/Common/Table/index.tsx index 40ff324cb..906bd39f4 100644 --- a/src/components/Common/Table/index.tsx +++ b/src/components/Common/Table/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { withProperties } from '../../../utils/typeHelpers'; type TBodyProps = { diff --git a/src/components/Common/Tooltip/index.tsx b/src/components/Common/Tooltip/index.tsx new file mode 100644 index 000000000..57b4b7b3d --- /dev/null +++ b/src/components/Common/Tooltip/index.tsx @@ -0,0 +1,36 @@ +import { usePopperTooltip } from 'react-popper-tooltip'; +import type { Config } from 'react-popper-tooltip'; + +type TooltipProps = { + content: React.ReactNode; + children: React.ReactNode; + tooltipConfig?: Config; +}; + +const Tooltip = ({ children, content, tooltipConfig }: TooltipProps) => { + const { getTooltipProps, setTooltipRef, setTriggerRef, visible } = + usePopperTooltip({ + followCursor: true, + placement: 'left-end', + ...tooltipConfig, + }); + + return ( + <> +
{children}
+ {visible && ( +
+ {content} +
+ )} + + ); +}; + +export default Tooltip; diff --git a/src/components/CompanyCard/index.tsx b/src/components/CompanyCard/index.tsx index afd65a558..762d1a08b 100644 --- a/src/components/CompanyCard/index.tsx +++ b/src/components/CompanyCard/index.tsx @@ -1,5 +1,5 @@ import Link from 'next/link'; -import React, { useState } from 'react'; +import { useState } from 'react'; interface CompanyCardProps { name: string; diff --git a/src/components/Discover/DiscoverMovieGenre/index.tsx b/src/components/Discover/DiscoverMovieGenre/index.tsx index 446d0723a..7adb34bae 100644 --- a/src/components/Discover/DiscoverMovieGenre/index.tsx +++ b/src/components/Discover/DiscoverMovieGenre/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { MovieResult } from '../../../../server/models/Search'; import ListView from '../../Common/ListView'; import { defineMessages, useIntl } from 'react-intl'; diff --git a/src/components/Discover/DiscoverMovieLanguage/index.tsx b/src/components/Discover/DiscoverMovieLanguage/index.tsx index 88473d3bc..71ae64038 100644 --- a/src/components/Discover/DiscoverMovieLanguage/index.tsx +++ b/src/components/Discover/DiscoverMovieLanguage/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { MovieResult } from '../../../../server/models/Search'; import ListView from '../../Common/ListView'; import { defineMessages, useIntl } from 'react-intl'; diff --git a/src/components/Discover/DiscoverMovies.tsx b/src/components/Discover/DiscoverMovies.tsx index d8ea5e07a..470a18f52 100644 --- a/src/components/Discover/DiscoverMovies.tsx +++ b/src/components/Discover/DiscoverMovies.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { MovieResult } from '../../../server/models/Search'; import ListView from '../Common/ListView'; import { defineMessages, useIntl } from 'react-intl'; diff --git a/src/components/Discover/DiscoverNetwork/index.tsx b/src/components/Discover/DiscoverNetwork/index.tsx index e4b1fe3fc..3861d3b6d 100644 --- a/src/components/Discover/DiscoverNetwork/index.tsx +++ b/src/components/Discover/DiscoverNetwork/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { TvResult } from '../../../../server/models/Search'; import ListView from '../../Common/ListView'; import { defineMessages, useIntl } from 'react-intl'; diff --git a/src/components/Discover/DiscoverStudio/index.tsx b/src/components/Discover/DiscoverStudio/index.tsx index e762476cd..a3cd26000 100644 --- a/src/components/Discover/DiscoverStudio/index.tsx +++ b/src/components/Discover/DiscoverStudio/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { MovieResult } from '../../../../server/models/Search'; import ListView from '../../Common/ListView'; import { defineMessages, useIntl } from 'react-intl'; diff --git a/src/components/Discover/DiscoverTv.tsx b/src/components/Discover/DiscoverTv.tsx index 40224f628..ff64c8fd6 100644 --- a/src/components/Discover/DiscoverTv.tsx +++ b/src/components/Discover/DiscoverTv.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { TvResult } from '../../../server/models/Search'; import ListView from '../Common/ListView'; import { defineMessages, useIntl } from 'react-intl'; diff --git a/src/components/Discover/DiscoverTvGenre/index.tsx b/src/components/Discover/DiscoverTvGenre/index.tsx index b95583c05..fd73d995e 100644 --- a/src/components/Discover/DiscoverTvGenre/index.tsx +++ b/src/components/Discover/DiscoverTvGenre/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { TvResult } from '../../../../server/models/Search'; import ListView from '../../Common/ListView'; import { defineMessages, useIntl } from 'react-intl'; diff --git a/src/components/Discover/DiscoverTvLanguage/index.tsx b/src/components/Discover/DiscoverTvLanguage/index.tsx index e21504e24..2f1cce709 100644 --- a/src/components/Discover/DiscoverTvLanguage/index.tsx +++ b/src/components/Discover/DiscoverTvLanguage/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { TvResult } from '../../../../server/models/Search'; import ListView from '../../Common/ListView'; import { defineMessages, useIntl } from 'react-intl'; diff --git a/src/components/Discover/DiscoverTvUpcoming.tsx b/src/components/Discover/DiscoverTvUpcoming.tsx index bad8966c5..db880b0ff 100644 --- a/src/components/Discover/DiscoverTvUpcoming.tsx +++ b/src/components/Discover/DiscoverTvUpcoming.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { TvResult } from '../../../server/models/Search'; import ListView from '../Common/ListView'; import { defineMessages, useIntl } from 'react-intl'; diff --git a/src/components/Discover/MovieGenreList/index.tsx b/src/components/Discover/MovieGenreList/index.tsx index ad12fbc34..03e76588c 100644 --- a/src/components/Discover/MovieGenreList/index.tsx +++ b/src/components/Discover/MovieGenreList/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { GenreSliderItem } from '../../../../server/interfaces/api/discoverInterfaces'; diff --git a/src/components/Discover/MovieGenreSlider/index.tsx b/src/components/Discover/MovieGenreSlider/index.tsx index d17b2d370..29234635c 100644 --- a/src/components/Discover/MovieGenreSlider/index.tsx +++ b/src/components/Discover/MovieGenreSlider/index.tsx @@ -1,6 +1,7 @@ +import React from 'react'; import { ArrowCircleRightIcon } from '@heroicons/react/outline'; import Link from 'next/link'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { GenreSliderItem } from '../../../../server/interfaces/api/discoverInterfaces'; diff --git a/src/components/Discover/NetworkSlider/index.tsx b/src/components/Discover/NetworkSlider/index.tsx index c5f4c14c1..c84057ef3 100644 --- a/src/components/Discover/NetworkSlider/index.tsx +++ b/src/components/Discover/NetworkSlider/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import CompanyCard from '../../CompanyCard'; import Slider from '../../Slider'; diff --git a/src/components/Discover/StudioSlider/index.tsx b/src/components/Discover/StudioSlider/index.tsx index 77797a669..b50fc23f6 100644 --- a/src/components/Discover/StudioSlider/index.tsx +++ b/src/components/Discover/StudioSlider/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import CompanyCard from '../../CompanyCard'; import Slider from '../../Slider'; diff --git a/src/components/Discover/Trending.tsx b/src/components/Discover/Trending.tsx index 69c0b505e..64b696f81 100644 --- a/src/components/Discover/Trending.tsx +++ b/src/components/Discover/Trending.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { MovieResult, TvResult, diff --git a/src/components/Discover/TvGenreList/index.tsx b/src/components/Discover/TvGenreList/index.tsx index 2409c984e..4a82e0089 100644 --- a/src/components/Discover/TvGenreList/index.tsx +++ b/src/components/Discover/TvGenreList/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { GenreSliderItem } from '../../../../server/interfaces/api/discoverInterfaces'; diff --git a/src/components/Discover/TvGenreSlider/index.tsx b/src/components/Discover/TvGenreSlider/index.tsx index 8398e4c36..e2bdd1696 100644 --- a/src/components/Discover/TvGenreSlider/index.tsx +++ b/src/components/Discover/TvGenreSlider/index.tsx @@ -1,6 +1,7 @@ +import React from 'react'; import { ArrowCircleRightIcon } from '@heroicons/react/outline'; import Link from 'next/link'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { GenreSliderItem } from '../../../../server/interfaces/api/discoverInterfaces'; diff --git a/src/components/Discover/Upcoming.tsx b/src/components/Discover/Upcoming.tsx index ede326f87..5586cee40 100644 --- a/src/components/Discover/Upcoming.tsx +++ b/src/components/Discover/Upcoming.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { MovieResult } from '../../../server/models/Search'; import ListView from '../Common/ListView'; import { defineMessages, useIntl } from 'react-intl'; diff --git a/src/components/Discover/index.tsx b/src/components/Discover/index.tsx index 1091c7ac6..46979609e 100644 --- a/src/components/Discover/index.tsx +++ b/src/components/Discover/index.tsx @@ -1,6 +1,6 @@ import { ArrowCircleRightIcon } from '@heroicons/react/outline'; import Link from 'next/link'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { MediaResultsResponse } from '../../../server/interfaces/api/mediaInterfaces'; diff --git a/src/components/DownloadBlock/index.tsx b/src/components/DownloadBlock/index.tsx index 8224d91c7..61cca7c7e 100644 --- a/src/components/DownloadBlock/index.tsx +++ b/src/components/DownloadBlock/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { defineMessages, FormattedRelativeTime, useIntl } from 'react-intl'; import type { DownloadingItem } from '../../../server/lib/downloadtracker'; import Badge from '../Common/Badge'; diff --git a/src/components/ExternalLinkBlock/index.tsx b/src/components/ExternalLinkBlock/index.tsx index 04f167e4b..4753c6f53 100644 --- a/src/components/ExternalLinkBlock/index.tsx +++ b/src/components/ExternalLinkBlock/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { MediaType } from '../../../server/constants/media'; import ImdbLogo from '../../assets/services/imdb.svg'; import PlexLogo from '../../assets/services/plex.svg'; diff --git a/src/components/GenreCard/index.tsx b/src/components/GenreCard/index.tsx index 241df11c4..8dfcbd6c5 100644 --- a/src/components/GenreCard/index.tsx +++ b/src/components/GenreCard/index.tsx @@ -1,5 +1,5 @@ import Link from 'next/link'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { withProperties } from '../../utils/typeHelpers'; import CachedImage from '../Common/CachedImage'; diff --git a/src/components/IssueBlock/index.tsx b/src/components/IssueBlock/index.tsx index 3fe29ee98..151523b8b 100644 --- a/src/components/IssueBlock/index.tsx +++ b/src/components/IssueBlock/index.tsx @@ -5,7 +5,7 @@ import { UserIcon, } from '@heroicons/react/solid'; import Link from 'next/link'; -import React from 'react'; + import { useIntl } from 'react-intl'; import type Issue from '../../../server/entity/Issue'; import { useUser } from '../../hooks/useUser'; diff --git a/src/components/IssueDetails/IssueComment/index.tsx b/src/components/IssueDetails/IssueComment/index.tsx index 25e94eedf..141ed2a0b 100644 --- a/src/components/IssueDetails/IssueComment/index.tsx +++ b/src/components/IssueDetails/IssueComment/index.tsx @@ -4,7 +4,7 @@ import { DotsVerticalIcon } from '@heroicons/react/solid'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; import Link from 'next/link'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { defineMessages, FormattedRelativeTime, useIntl } from 'react-intl'; import ReactMarkdown from 'react-markdown'; import * as Yup from 'yup'; diff --git a/src/components/IssueDetails/IssueDescription/index.tsx b/src/components/IssueDetails/IssueDescription/index.tsx index 6c77c7af1..ccd14ba70 100644 --- a/src/components/IssueDetails/IssueDescription/index.tsx +++ b/src/components/IssueDetails/IssueDescription/index.tsx @@ -1,7 +1,7 @@ import { Menu, Transition } from '@headlessui/react'; import { DotsVerticalIcon } from '@heroicons/react/solid'; import { Field, Form, Formik } from 'formik'; -import React, { Fragment, useState } from 'react'; +import { Fragment, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import ReactMarkdown from 'react-markdown'; import { Permission, useUser } from '../../../hooks/useUser'; diff --git a/src/components/IssueDetails/index.tsx b/src/components/IssueDetails/index.tsx index cc475b97a..c5fe5eb94 100644 --- a/src/components/IssueDetails/index.tsx +++ b/src/components/IssueDetails/index.tsx @@ -10,7 +10,7 @@ import axios from 'axios'; import { Field, Form, Formik } from 'formik'; import Link from 'next/link'; import { useRouter } from 'next/router'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { defineMessages, FormattedRelativeTime, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/IssueList/IssueItem/index.tsx b/src/components/IssueList/IssueItem/index.tsx index 250993e21..2847deec6 100644 --- a/src/components/IssueList/IssueItem/index.tsx +++ b/src/components/IssueList/IssueItem/index.tsx @@ -1,6 +1,6 @@ import { EyeIcon } from '@heroicons/react/solid'; import Link from 'next/link'; -import React from 'react'; + import { useInView } from 'react-intersection-observer'; import { defineMessages, FormattedRelativeTime, useIntl } from 'react-intl'; import useSWR from 'swr'; diff --git a/src/components/IssueList/index.tsx b/src/components/IssueList/index.tsx index 2fd7975bb..816ebf1f2 100644 --- a/src/components/IssueList/index.tsx +++ b/src/components/IssueList/index.tsx @@ -5,7 +5,8 @@ import { SortDescendingIcon, } from '@heroicons/react/solid'; import { useRouter } from 'next/router'; -import React, { useEffect, useState } from 'react'; + +import { useEffect, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { IssueResultsResponse } from '../../../server/interfaces/api/issueInterfaces'; diff --git a/src/components/IssueModal/CreateIssueModal/index.tsx b/src/components/IssueModal/CreateIssueModal/index.tsx index 93cebc9c4..f87577146 100644 --- a/src/components/IssueModal/CreateIssueModal/index.tsx +++ b/src/components/IssueModal/CreateIssueModal/index.tsx @@ -4,7 +4,7 @@ import { ArrowCircleRightIcon } from '@heroicons/react/solid'; import axios from 'axios'; import { Field, Formik } from 'formik'; import Link from 'next/link'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/IssueModal/index.tsx b/src/components/IssueModal/index.tsx index 9ac059a0b..a05581b46 100644 --- a/src/components/IssueModal/index.tsx +++ b/src/components/IssueModal/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import Transition from '../Transition'; import CreateIssueModal from './CreateIssueModal'; diff --git a/src/components/JSONEditor/index.tsx b/src/components/JSONEditor/index.tsx index df49c0718..6999c92af 100644 --- a/src/components/JSONEditor/index.tsx +++ b/src/components/JSONEditor/index.tsx @@ -1,5 +1,5 @@ import type { HTMLAttributes } from 'react'; -import React from 'react'; + import AceEditor from 'react-ace'; import 'ace-builds/src-noconflict/mode-json'; import 'ace-builds/src-noconflict/theme-dracula'; diff --git a/src/components/LanguageSelector/index.tsx b/src/components/LanguageSelector/index.tsx index 05f945ac2..a63967468 100644 --- a/src/components/LanguageSelector/index.tsx +++ b/src/components/LanguageSelector/index.tsx @@ -1,5 +1,5 @@ import { sortBy } from 'lodash'; -import React, { useMemo } from 'react'; +import { useMemo } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import type { CSSObjectWithLabel } from 'react-select'; import Select from 'react-select'; diff --git a/src/components/Layout/LanguagePicker/index.tsx b/src/components/Layout/LanguagePicker/index.tsx index 7a07047bd..a06ae2497 100644 --- a/src/components/Layout/LanguagePicker/index.tsx +++ b/src/components/Layout/LanguagePicker/index.tsx @@ -1,5 +1,5 @@ import { TranslateIcon } from '@heroicons/react/solid'; -import React, { useRef, useState } from 'react'; +import { useRef, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import type { AvailableLocale } from '../../../context/LanguageContext'; import { availableLanguages } from '../../../context/LanguageContext'; diff --git a/src/components/Layout/Notifications/index.tsx b/src/components/Layout/Notifications/index.tsx index 9a1e827dd..eed2697eb 100644 --- a/src/components/Layout/Notifications/index.tsx +++ b/src/components/Layout/Notifications/index.tsx @@ -1,5 +1,4 @@ import { BellIcon } from '@heroicons/react/outline'; -import React from 'react'; const Notifications = () => { return ( diff --git a/src/components/Layout/SearchInput/index.tsx b/src/components/Layout/SearchInput/index.tsx index 9fd6d5cd6..fb2628ea9 100644 --- a/src/components/Layout/SearchInput/index.tsx +++ b/src/components/Layout/SearchInput/index.tsx @@ -1,6 +1,6 @@ import { XCircleIcon } from '@heroicons/react/outline'; import { SearchIcon } from '@heroicons/react/solid'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSearchInput from '../../../hooks/useSearchInput'; diff --git a/src/components/Layout/Sidebar/index.tsx b/src/components/Layout/Sidebar/index.tsx index 57a3dc32c..815213880 100644 --- a/src/components/Layout/Sidebar/index.tsx +++ b/src/components/Layout/Sidebar/index.tsx @@ -8,8 +8,7 @@ import { } from '@heroicons/react/outline'; import Link from 'next/link'; import { useRouter } from 'next/router'; -import type { ReactNode } from 'react'; -import React, { useRef } from 'react'; +import { useRef } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import useClickOutside from '../../../hooks/useClickOutside'; import { Permission, useUser } from '../../../hooks/useUser'; @@ -31,7 +30,7 @@ interface SidebarProps { interface SidebarLinkProps { href: string; - svgIcon: ReactNode; + svgIcon: React.ReactNode; messagesKey: keyof typeof messages; activeRegExp: RegExp; as?: string; diff --git a/src/components/Layout/UserDropdown/index.tsx b/src/components/Layout/UserDropdown/index.tsx index 7ab066f18..e2e6cf13c 100644 --- a/src/components/Layout/UserDropdown/index.tsx +++ b/src/components/Layout/UserDropdown/index.tsx @@ -2,7 +2,7 @@ import { LogoutIcon } from '@heroicons/react/outline'; import { CogIcon, UserIcon } from '@heroicons/react/solid'; import axios from 'axios'; import Link from 'next/link'; -import React, { useRef, useState } from 'react'; +import { useRef, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import useClickOutside from '../../../hooks/useClickOutside'; import { useUser } from '../../../hooks/useUser'; diff --git a/src/components/Layout/VersionStatus/index.tsx b/src/components/Layout/VersionStatus/index.tsx index 9b8aef966..5a609707a 100644 --- a/src/components/Layout/VersionStatus/index.tsx +++ b/src/components/Layout/VersionStatus/index.tsx @@ -5,7 +5,7 @@ import { ServerIcon, } from '@heroicons/react/outline'; import Link from 'next/link'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { StatusResponse } from '../../../../server/interfaces/api/settingsInterfaces'; diff --git a/src/components/Layout/index.tsx b/src/components/Layout/index.tsx index f32217b54..fc8422b43 100644 --- a/src/components/Layout/index.tsx +++ b/src/components/Layout/index.tsx @@ -1,7 +1,8 @@ import { MenuAlt2Icon } from '@heroicons/react/outline'; import { ArrowLeftIcon } from '@heroicons/react/solid'; import { useRouter } from 'next/router'; -import React, { useEffect, useState } from 'react'; + +import { useEffect, useState } from 'react'; import type { AvailableLocale } from '../../context/LanguageContext'; import useLocale from '../../hooks/useLocale'; import useSettings from '../../hooks/useSettings'; diff --git a/src/components/Login/LocalLogin.tsx b/src/components/Login/LocalLogin.tsx index 900f36c3c..a7dcfc4e5 100644 --- a/src/components/Login/LocalLogin.tsx +++ b/src/components/Login/LocalLogin.tsx @@ -2,7 +2,7 @@ import { LoginIcon, SupportIcon } from '@heroicons/react/outline'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; import Link from 'next/link'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import * as Yup from 'yup'; import useSettings from '../../hooks/useSettings'; diff --git a/src/components/Login/index.tsx b/src/components/Login/index.tsx index a1fec0d24..519bb4ca7 100644 --- a/src/components/Login/index.tsx +++ b/src/components/Login/index.tsx @@ -1,7 +1,7 @@ import { XCircleIcon } from '@heroicons/react/solid'; import axios from 'axios'; import { useRouter } from 'next/dist/client/router'; -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import useSettings from '../../hooks/useSettings'; diff --git a/src/components/ManageSlideOver/index.tsx b/src/components/ManageSlideOver/index.tsx index 3698f9590..ba3cce686 100644 --- a/src/components/ManageSlideOver/index.tsx +++ b/src/components/ManageSlideOver/index.tsx @@ -2,7 +2,7 @@ import { ServerIcon, ViewListIcon } from '@heroicons/react/outline'; import { CheckCircleIcon, DocumentRemoveIcon } from '@heroicons/react/solid'; import axios from 'axios'; import Link from 'next/link'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import { IssueStatus } from '../../../server/constants/issue'; diff --git a/src/components/MediaSlider/ShowMoreCard/index.tsx b/src/components/MediaSlider/ShowMoreCard/index.tsx index 3bc074c17..99900ac9a 100644 --- a/src/components/MediaSlider/ShowMoreCard/index.tsx +++ b/src/components/MediaSlider/ShowMoreCard/index.tsx @@ -1,6 +1,6 @@ import { ArrowCircleRightIcon } from '@heroicons/react/solid'; import Link from 'next/link'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; const messages = defineMessages({ diff --git a/src/components/MediaSlider/index.tsx b/src/components/MediaSlider/index.tsx index fd43f611a..54ed81dce 100644 --- a/src/components/MediaSlider/index.tsx +++ b/src/components/MediaSlider/index.tsx @@ -1,6 +1,6 @@ import { ArrowCircleRightIcon } from '@heroicons/react/outline'; import Link from 'next/link'; -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import useSWRInfinite from 'swr/infinite'; import { MediaStatus } from '../../../server/constants/media'; import type { diff --git a/src/components/MovieDetails/MovieCast/index.tsx b/src/components/MovieDetails/MovieCast/index.tsx index d26ec4e5d..e096b5981 100644 --- a/src/components/MovieDetails/MovieCast/index.tsx +++ b/src/components/MovieDetails/MovieCast/index.tsx @@ -1,6 +1,6 @@ import Link from 'next/link'; import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { MovieDetails } from '../../../../server/models/Movie'; diff --git a/src/components/MovieDetails/MovieCrew/index.tsx b/src/components/MovieDetails/MovieCrew/index.tsx index eb2ccccf9..8d0e2d8c7 100644 --- a/src/components/MovieDetails/MovieCrew/index.tsx +++ b/src/components/MovieDetails/MovieCrew/index.tsx @@ -1,6 +1,6 @@ import Link from 'next/link'; import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { MovieDetails } from '../../../../server/models/Movie'; diff --git a/src/components/MovieDetails/MovieRecommendations.tsx b/src/components/MovieDetails/MovieRecommendations.tsx index 795dd8d77..aa79971e0 100644 --- a/src/components/MovieDetails/MovieRecommendations.tsx +++ b/src/components/MovieDetails/MovieRecommendations.tsx @@ -1,6 +1,6 @@ import Link from 'next/link'; import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { MovieDetails } from '../../../server/models/Movie'; diff --git a/src/components/MovieDetails/MovieSimilar.tsx b/src/components/MovieDetails/MovieSimilar.tsx index e9c37ae3c..5b49530e0 100644 --- a/src/components/MovieDetails/MovieSimilar.tsx +++ b/src/components/MovieDetails/MovieSimilar.tsx @@ -1,6 +1,6 @@ import Link from 'next/link'; import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { MovieDetails } from '../../../server/models/Movie'; diff --git a/src/components/MovieDetails/index.tsx b/src/components/MovieDetails/index.tsx index 65f902a0f..9b705bcd3 100644 --- a/src/components/MovieDetails/index.tsx +++ b/src/components/MovieDetails/index.tsx @@ -16,7 +16,8 @@ import 'country-flag-icons/3x2/flags.css'; import { uniqBy } from 'lodash'; import Link from 'next/link'; import { useRouter } from 'next/router'; -import React, { useEffect, useMemo, useState } from 'react'; + +import { useEffect, useMemo, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { RTRating } from '../../../server/api/rottentomatoes'; @@ -40,6 +41,7 @@ import LoadingSpinner from '../Common/LoadingSpinner'; import PageTitle from '../Common/PageTitle'; import type { PlayButtonLink } from '../Common/PlayButton'; import PlayButton from '../Common/PlayButton'; +import Tooltip from '../Common/Tooltip'; import ExternalLinkBlock from '../ExternalLinkBlock'; import IssueModal from '../IssueModal'; import ManageSlideOver from '../ManageSlideOver'; @@ -74,6 +76,9 @@ const messages = defineMessages({ streamingproviders: 'Currently Streaming On', productioncountries: 'Production {countryCount, plural, one {Country} other {Countries}}', + theatricalrelease: 'Theatrical Release', + digitalrelease: 'Digital Release', + physicalrelease: 'Physical Release', }); interface MovieDetailsProps { @@ -548,22 +553,36 @@ const MovieDetails = ({ movie }: MovieDetailsProps) => { > {r.type === 3 ? ( // Theatrical - + + + ) : r.type === 4 ? ( // Digital - + + + ) : ( // Physical - - - + + + + )} {intl.formatDate(r.release_date, { diff --git a/src/components/NotificationTypeSelector/NotificationType/index.tsx b/src/components/NotificationTypeSelector/NotificationType/index.tsx index 4c446e1d8..901b83b30 100644 --- a/src/components/NotificationTypeSelector/NotificationType/index.tsx +++ b/src/components/NotificationTypeSelector/NotificationType/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NotificationItem } from '..'; import { hasNotificationType } from '..'; diff --git a/src/components/NotificationTypeSelector/index.tsx b/src/components/NotificationTypeSelector/index.tsx index 976358785..c7066fa80 100644 --- a/src/components/NotificationTypeSelector/index.tsx +++ b/src/components/NotificationTypeSelector/index.tsx @@ -1,5 +1,5 @@ import { sortBy } from 'lodash'; -import React, { useMemo, useState } from 'react'; +import { useMemo, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import useSettings from '../../hooks/useSettings'; import type { User } from '../../hooks/useUser'; diff --git a/src/components/PWAHeader/index.tsx b/src/components/PWAHeader/index.tsx index 25588246e..0dde7e421 100644 --- a/src/components/PWAHeader/index.tsx +++ b/src/components/PWAHeader/index.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - interface PWAHeaderProps { applicationTitle?: string; } diff --git a/src/components/PermissionEdit/index.tsx b/src/components/PermissionEdit/index.tsx index 34dde6cde..b9e8515b1 100644 --- a/src/components/PermissionEdit/index.tsx +++ b/src/components/PermissionEdit/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import type { User } from '../../hooks/useUser'; import { Permission } from '../../hooks/useUser'; diff --git a/src/components/PermissionOption/index.tsx b/src/components/PermissionOption/index.tsx index 8ddf8575d..50ccc918f 100644 --- a/src/components/PermissionOption/index.tsx +++ b/src/components/PermissionOption/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { hasPermission } from '../../../server/lib/permissions'; import useSettings from '../../hooks/useSettings'; import type { User } from '../../hooks/useUser'; diff --git a/src/components/PersonCard/index.tsx b/src/components/PersonCard/index.tsx index 3293516ea..1a5446f64 100644 --- a/src/components/PersonCard/index.tsx +++ b/src/components/PersonCard/index.tsx @@ -1,6 +1,6 @@ import { UserCircleIcon } from '@heroicons/react/solid'; import Link from 'next/link'; -import React, { useState } from 'react'; +import { useState } from 'react'; import CachedImage from '../Common/CachedImage'; interface PersonCardProps { diff --git a/src/components/PersonDetails/index.tsx b/src/components/PersonDetails/index.tsx index c62fa54f4..dcfed322c 100644 --- a/src/components/PersonDetails/index.tsx +++ b/src/components/PersonDetails/index.tsx @@ -1,6 +1,6 @@ import { groupBy } from 'lodash'; import { useRouter } from 'next/router'; -import React, { useMemo, useState } from 'react'; +import { useMemo, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import TruncateMarkup from 'react-truncate-markup'; import useSWR from 'swr'; diff --git a/src/components/PlexLoginButton/index.tsx b/src/components/PlexLoginButton/index.tsx index e9f06ec69..7963ab0c4 100644 --- a/src/components/PlexLoginButton/index.tsx +++ b/src/components/PlexLoginButton/index.tsx @@ -1,5 +1,5 @@ import { LoginIcon } from '@heroicons/react/outline'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import globalMessages from '../../i18n/globalMessages'; import PlexOAuth from '../../utils/plex'; diff --git a/src/components/RegionSelector/index.tsx b/src/components/RegionSelector/index.tsx index f72c2c1ea..947518506 100644 --- a/src/components/RegionSelector/index.tsx +++ b/src/components/RegionSelector/index.tsx @@ -3,7 +3,7 @@ import { CheckIcon, ChevronDownIcon } from '@heroicons/react/solid'; import { hasFlag } from 'country-flag-icons'; import 'country-flag-icons/3x2/flags.css'; import { sortBy } from 'lodash'; -import React, { useEffect, useMemo, useState } from 'react'; +import { useEffect, useMemo, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { Region } from '../../../server/lib/settings'; diff --git a/src/components/RequestBlock/index.tsx b/src/components/RequestBlock/index.tsx index 7521a5f1c..ab58edc90 100644 --- a/src/components/RequestBlock/index.tsx +++ b/src/components/RequestBlock/index.tsx @@ -9,7 +9,7 @@ import { } from '@heroicons/react/solid'; import axios from 'axios'; import Link from 'next/link'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { MediaRequestStatus } from '../../../server/constants/media'; import type { MediaRequest } from '../../../server/entity/MediaRequest'; diff --git a/src/components/RequestButton/index.tsx b/src/components/RequestButton/index.tsx index 417acd846..223278599 100644 --- a/src/components/RequestButton/index.tsx +++ b/src/components/RequestButton/index.tsx @@ -5,7 +5,8 @@ import { XIcon, } from '@heroicons/react/solid'; import axios from 'axios'; -import React, { useMemo, useState } from 'react'; + +import { useMemo, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { MediaRequestStatus, diff --git a/src/components/RequestCard/index.tsx b/src/components/RequestCard/index.tsx index bbeaa8bd5..d9f1dbafe 100644 --- a/src/components/RequestCard/index.tsx +++ b/src/components/RequestCard/index.tsx @@ -7,7 +7,7 @@ import { } from '@heroicons/react/solid'; import axios from 'axios'; import Link from 'next/link'; -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { useInView } from 'react-intersection-observer'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; diff --git a/src/components/RequestList/RequestItem/index.tsx b/src/components/RequestList/RequestItem/index.tsx index 14530b4a9..4a5e396ae 100644 --- a/src/components/RequestList/RequestItem/index.tsx +++ b/src/components/RequestList/RequestItem/index.tsx @@ -7,7 +7,7 @@ import { } from '@heroicons/react/solid'; import axios from 'axios'; import Link from 'next/link'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { useInView } from 'react-intersection-observer'; import { defineMessages, FormattedRelativeTime, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; diff --git a/src/components/RequestList/index.tsx b/src/components/RequestList/index.tsx index 448f67964..2815d1e67 100644 --- a/src/components/RequestList/index.tsx +++ b/src/components/RequestList/index.tsx @@ -6,7 +6,8 @@ import { } from '@heroicons/react/solid'; import Link from 'next/link'; import { useRouter } from 'next/router'; -import React, { useEffect, useState } from 'react'; + +import { useEffect, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { RequestResultsResponse } from '../../../server/interfaces/api/requestInterfaces'; diff --git a/src/components/RequestModal/AdvancedRequester/index.tsx b/src/components/RequestModal/AdvancedRequester/index.tsx index 1b52c3129..d7ce96c3d 100644 --- a/src/components/RequestModal/AdvancedRequester/index.tsx +++ b/src/components/RequestModal/AdvancedRequester/index.tsx @@ -3,7 +3,7 @@ import { Listbox, Transition } from '@headlessui/react'; import { AdjustmentsIcon } from '@heroicons/react/outline'; import { CheckIcon, ChevronDownIcon } from '@heroicons/react/solid'; import { isEqual } from 'lodash'; -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import Select from 'react-select'; import useSWR from 'swr'; diff --git a/src/components/RequestModal/CollectionRequestModal.tsx b/src/components/RequestModal/CollectionRequestModal.tsx index 907ee9ca6..290b9df11 100644 --- a/src/components/RequestModal/CollectionRequestModal.tsx +++ b/src/components/RequestModal/CollectionRequestModal.tsx @@ -1,6 +1,7 @@ import { DownloadIcon } from '@heroicons/react/outline'; import axios from 'axios'; -import React, { useCallback, useEffect, useState } from 'react'; + +import { useCallback, useEffect, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/RequestModal/MovieRequestModal.tsx b/src/components/RequestModal/MovieRequestModal.tsx index b42cce719..cee5fa683 100644 --- a/src/components/RequestModal/MovieRequestModal.tsx +++ b/src/components/RequestModal/MovieRequestModal.tsx @@ -1,6 +1,7 @@ import { DownloadIcon } from '@heroicons/react/outline'; import axios from 'axios'; -import React, { useCallback, useEffect, useState } from 'react'; + +import { useCallback, useEffect, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR, { mutate } from 'swr'; diff --git a/src/components/RequestModal/QuotaDisplay/index.tsx b/src/components/RequestModal/QuotaDisplay/index.tsx index c578e858a..fb9e93b11 100644 --- a/src/components/RequestModal/QuotaDisplay/index.tsx +++ b/src/components/RequestModal/QuotaDisplay/index.tsx @@ -1,6 +1,7 @@ import { ChevronDownIcon, ChevronUpIcon } from '@heroicons/react/solid'; import Link from 'next/link'; -import React, { useState } from 'react'; + +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import type { QuotaStatus } from '../../../../server/interfaces/api/userInterfaces'; import ProgressCircle from '../../Common/ProgressCircle'; diff --git a/src/components/RequestModal/SearchByNameModal/index.tsx b/src/components/RequestModal/SearchByNameModal/index.tsx index cc8007eb0..856239ba8 100644 --- a/src/components/RequestModal/SearchByNameModal/index.tsx +++ b/src/components/RequestModal/SearchByNameModal/index.tsx @@ -1,5 +1,5 @@ import { DownloadIcon } from '@heroicons/react/outline'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { SonarrSeries } from '../../../../server/api/servarr/sonarr'; diff --git a/src/components/RequestModal/TvRequestModal.tsx b/src/components/RequestModal/TvRequestModal.tsx index 60613b3f0..7bc1103f8 100644 --- a/src/components/RequestModal/TvRequestModal.tsx +++ b/src/components/RequestModal/TvRequestModal.tsx @@ -1,6 +1,7 @@ import { DownloadIcon } from '@heroicons/react/outline'; import axios from 'axios'; -import React, { useState } from 'react'; + +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR, { mutate } from 'swr'; diff --git a/src/components/RequestModal/index.tsx b/src/components/RequestModal/index.tsx index 4b6741cc9..fd349b364 100644 --- a/src/components/RequestModal/index.tsx +++ b/src/components/RequestModal/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { MediaStatus } from '../../../server/constants/media'; import type { MediaRequest } from '../../../server/entity/MediaRequest'; import Transition from '../Transition'; diff --git a/src/components/ResetPassword/RequestResetLink.tsx b/src/components/ResetPassword/RequestResetLink.tsx index 9232f300c..4e0cbdf68 100644 --- a/src/components/ResetPassword/RequestResetLink.tsx +++ b/src/components/ResetPassword/RequestResetLink.tsx @@ -2,7 +2,7 @@ import { ArrowLeftIcon, MailIcon } from '@heroicons/react/solid'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; import Link from 'next/link'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import * as Yup from 'yup'; import Button from '../Common/Button'; diff --git a/src/components/ResetPassword/index.tsx b/src/components/ResetPassword/index.tsx index ad2a3e445..4da87ac08 100644 --- a/src/components/ResetPassword/index.tsx +++ b/src/components/ResetPassword/index.tsx @@ -3,7 +3,7 @@ import axios from 'axios'; import { Form, Formik } from 'formik'; import Link from 'next/link'; import { useRouter } from 'next/router'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import * as Yup from 'yup'; import globalMessages from '../../i18n/globalMessages'; diff --git a/src/components/Search/index.tsx b/src/components/Search/index.tsx index 132e36191..a85c75df4 100644 --- a/src/components/Search/index.tsx +++ b/src/components/Search/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { useRouter } from 'next/router'; import type { TvResult, diff --git a/src/components/Settings/CopyButton.tsx b/src/components/Settings/CopyButton.tsx index a75f81cc8..da48fe5db 100644 --- a/src/components/Settings/CopyButton.tsx +++ b/src/components/Settings/CopyButton.tsx @@ -1,5 +1,5 @@ import { ClipboardCopyIcon } from '@heroicons/react/solid'; -import React, { useEffect } from 'react'; +import { useEffect } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useClipboard from 'react-use-clipboard'; diff --git a/src/components/Settings/LibraryItem.tsx b/src/components/Settings/LibraryItem.tsx index 5b3946c09..eba0de403 100644 --- a/src/components/Settings/LibraryItem.tsx +++ b/src/components/Settings/LibraryItem.tsx @@ -1,5 +1,4 @@ import { CheckIcon, XIcon } from '@heroicons/react/solid'; -import React from 'react'; interface LibraryItemProps { isEnabled?: boolean; diff --git a/src/components/Settings/Notifications/NotificationsDiscord.tsx b/src/components/Settings/Notifications/NotificationsDiscord.tsx index a43f596b2..3c1bb96fd 100644 --- a/src/components/Settings/Notifications/NotificationsDiscord.tsx +++ b/src/components/Settings/Notifications/NotificationsDiscord.tsx @@ -1,7 +1,8 @@ import { BeakerIcon, SaveIcon } from '@heroicons/react/outline'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; -import React, { useState } from 'react'; + +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/Settings/Notifications/NotificationsEmail.tsx b/src/components/Settings/Notifications/NotificationsEmail.tsx index 4076acc1f..fac6dd664 100644 --- a/src/components/Settings/Notifications/NotificationsEmail.tsx +++ b/src/components/Settings/Notifications/NotificationsEmail.tsx @@ -1,7 +1,8 @@ import { BeakerIcon, SaveIcon } from '@heroicons/react/outline'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; -import React, { useState } from 'react'; + +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR, { mutate } from 'swr'; diff --git a/src/components/Settings/Notifications/NotificationsGotify/index.tsx b/src/components/Settings/Notifications/NotificationsGotify/index.tsx index e7573bb00..10bd08077 100644 --- a/src/components/Settings/Notifications/NotificationsGotify/index.tsx +++ b/src/components/Settings/Notifications/NotificationsGotify/index.tsx @@ -1,7 +1,7 @@ import { BeakerIcon, SaveIcon } from '@heroicons/react/solid'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/Settings/Notifications/NotificationsLunaSea/index.tsx b/src/components/Settings/Notifications/NotificationsLunaSea/index.tsx index 859a23346..33fd9e89f 100644 --- a/src/components/Settings/Notifications/NotificationsLunaSea/index.tsx +++ b/src/components/Settings/Notifications/NotificationsLunaSea/index.tsx @@ -1,7 +1,8 @@ import { BeakerIcon, SaveIcon } from '@heroicons/react/outline'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; -import React, { useState } from 'react'; + +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/Settings/Notifications/NotificationsPushbullet/index.tsx b/src/components/Settings/Notifications/NotificationsPushbullet/index.tsx index c6ec8432e..31b47125e 100644 --- a/src/components/Settings/Notifications/NotificationsPushbullet/index.tsx +++ b/src/components/Settings/Notifications/NotificationsPushbullet/index.tsx @@ -1,7 +1,8 @@ import { BeakerIcon, SaveIcon } from '@heroicons/react/outline'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; -import React, { useState } from 'react'; + +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/Settings/Notifications/NotificationsPushover/index.tsx b/src/components/Settings/Notifications/NotificationsPushover/index.tsx index 9f78a6784..a8b07e5fe 100644 --- a/src/components/Settings/Notifications/NotificationsPushover/index.tsx +++ b/src/components/Settings/Notifications/NotificationsPushover/index.tsx @@ -1,7 +1,8 @@ import { BeakerIcon, SaveIcon } from '@heroicons/react/outline'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; -import React, { useState } from 'react'; + +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/Settings/Notifications/NotificationsSlack/index.tsx b/src/components/Settings/Notifications/NotificationsSlack/index.tsx index db91d17f0..868973bce 100644 --- a/src/components/Settings/Notifications/NotificationsSlack/index.tsx +++ b/src/components/Settings/Notifications/NotificationsSlack/index.tsx @@ -1,7 +1,8 @@ import { BeakerIcon, SaveIcon } from '@heroicons/react/outline'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; -import React, { useState } from 'react'; + +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/Settings/Notifications/NotificationsTelegram.tsx b/src/components/Settings/Notifications/NotificationsTelegram.tsx index 9f25fda8d..da6deecbd 100644 --- a/src/components/Settings/Notifications/NotificationsTelegram.tsx +++ b/src/components/Settings/Notifications/NotificationsTelegram.tsx @@ -1,7 +1,8 @@ import { BeakerIcon, SaveIcon } from '@heroicons/react/outline'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; -import React, { useState } from 'react'; + +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/Settings/Notifications/NotificationsWebPush/index.tsx b/src/components/Settings/Notifications/NotificationsWebPush/index.tsx index 55bfb9490..9fb1060fb 100644 --- a/src/components/Settings/Notifications/NotificationsWebPush/index.tsx +++ b/src/components/Settings/Notifications/NotificationsWebPush/index.tsx @@ -1,7 +1,7 @@ import { BeakerIcon, SaveIcon } from '@heroicons/react/outline'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR, { mutate } from 'swr'; diff --git a/src/components/Settings/Notifications/NotificationsWebhook/index.tsx b/src/components/Settings/Notifications/NotificationsWebhook/index.tsx index 8c0ef1dc1..4383dd627 100644 --- a/src/components/Settings/Notifications/NotificationsWebhook/index.tsx +++ b/src/components/Settings/Notifications/NotificationsWebhook/index.tsx @@ -4,7 +4,7 @@ import axios from 'axios'; import { Field, Form, Formik } from 'formik'; import dynamic from 'next/dynamic'; import Link from 'next/link'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/Settings/RadarrModal/index.tsx b/src/components/Settings/RadarrModal/index.tsx index 05e98d5c6..76a1c3119 100644 --- a/src/components/Settings/RadarrModal/index.tsx +++ b/src/components/Settings/RadarrModal/index.tsx @@ -1,7 +1,8 @@ import { PencilIcon, PlusIcon } from '@heroicons/react/solid'; import axios from 'axios'; import { Field, Formik } from 'formik'; -import React, { useCallback, useEffect, useRef, useState } from 'react'; + +import { useCallback, useEffect, useRef, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import Select from 'react-select'; import { useToasts } from 'react-toast-notifications'; diff --git a/src/components/Settings/SettingsAbout/Releases/index.tsx b/src/components/Settings/SettingsAbout/Releases/index.tsx index cfe92882a..08b353991 100644 --- a/src/components/Settings/SettingsAbout/Releases/index.tsx +++ b/src/components/Settings/SettingsAbout/Releases/index.tsx @@ -1,5 +1,5 @@ import { DocumentTextIcon } from '@heroicons/react/outline'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { defineMessages, FormattedRelativeTime, useIntl } from 'react-intl'; import ReactMarkdown from 'react-markdown'; import useSWR from 'swr'; diff --git a/src/components/Settings/SettingsAbout/index.tsx b/src/components/Settings/SettingsAbout/index.tsx index c484a5f0e..3274f7202 100644 --- a/src/components/Settings/SettingsAbout/index.tsx +++ b/src/components/Settings/SettingsAbout/index.tsx @@ -1,5 +1,5 @@ import { InformationCircleIcon } from '@heroicons/react/solid'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { diff --git a/src/components/Settings/SettingsJobsCache/index.tsx b/src/components/Settings/SettingsJobsCache/index.tsx index eaaf57934..7172df7a6 100644 --- a/src/components/Settings/SettingsJobsCache/index.tsx +++ b/src/components/Settings/SettingsJobsCache/index.tsx @@ -1,7 +1,7 @@ import { PlayIcon, StopIcon, TrashIcon } from '@heroicons/react/outline'; import { PencilIcon } from '@heroicons/react/solid'; import axios from 'axios'; -import React, { useState } from 'react'; +import { useState } from 'react'; import type { MessageDescriptor } from 'react-intl'; import { defineMessages, FormattedRelativeTime, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; diff --git a/src/components/Settings/SettingsLayout.tsx b/src/components/Settings/SettingsLayout.tsx index f5bdb6f3e..6b89ab479 100644 --- a/src/components/Settings/SettingsLayout.tsx +++ b/src/components/Settings/SettingsLayout.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import globalMessages from '../../i18n/globalMessages'; import PageTitle from '../Common/PageTitle'; diff --git a/src/components/Settings/SettingsLogs/index.tsx b/src/components/Settings/SettingsLogs/index.tsx index 412941771..8263dbc57 100644 --- a/src/components/Settings/SettingsLogs/index.tsx +++ b/src/components/Settings/SettingsLogs/index.tsx @@ -9,7 +9,8 @@ import { } from '@heroicons/react/solid'; import copy from 'copy-to-clipboard'; import { useRouter } from 'next/router'; -import React, { useEffect, useState } from 'react'; + +import { useEffect, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/Settings/SettingsMain.tsx b/src/components/Settings/SettingsMain.tsx index c4dd34b43..4a8b69a1e 100644 --- a/src/components/Settings/SettingsMain.tsx +++ b/src/components/Settings/SettingsMain.tsx @@ -2,7 +2,7 @@ import { SaveIcon } from '@heroicons/react/outline'; import { RefreshIcon } from '@heroicons/react/solid'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR, { mutate } from 'swr'; diff --git a/src/components/Settings/SettingsNotifications.tsx b/src/components/Settings/SettingsNotifications.tsx index c8a7a5223..82bb70740 100644 --- a/src/components/Settings/SettingsNotifications.tsx +++ b/src/components/Settings/SettingsNotifications.tsx @@ -1,5 +1,5 @@ import { CloudIcon, LightningBoltIcon, MailIcon } from '@heroicons/react/solid'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import DiscordLogo from '../../assets/extlogos/discord.svg'; import GotifyLogo from '../../assets/extlogos/gotify.svg'; diff --git a/src/components/Settings/SettingsPlex.tsx b/src/components/Settings/SettingsPlex.tsx index 4a57aac99..1387c351c 100644 --- a/src/components/Settings/SettingsPlex.tsx +++ b/src/components/Settings/SettingsPlex.tsx @@ -3,7 +3,8 @@ import { RefreshIcon, SearchIcon, XIcon } from '@heroicons/react/solid'; import axios from 'axios'; import { Field, Formik } from 'formik'; import { orderBy } from 'lodash'; -import React, { useMemo, useState } from 'react'; + +import { useMemo, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/Settings/SettingsServices.tsx b/src/components/Settings/SettingsServices.tsx index 8d6398dbc..f460bb1da 100644 --- a/src/components/Settings/SettingsServices.tsx +++ b/src/components/Settings/SettingsServices.tsx @@ -1,6 +1,7 @@ import { PencilIcon, PlusIcon, TrashIcon } from '@heroicons/react/solid'; import axios from 'axios'; -import React, { useState } from 'react'; + +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import useSWR, { mutate } from 'swr'; import type { diff --git a/src/components/Settings/SettingsUsers/index.tsx b/src/components/Settings/SettingsUsers/index.tsx index f6afd4cb7..bb3a8d891 100644 --- a/src/components/Settings/SettingsUsers/index.tsx +++ b/src/components/Settings/SettingsUsers/index.tsx @@ -1,7 +1,7 @@ import { SaveIcon } from '@heroicons/react/outline'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR, { mutate } from 'swr'; diff --git a/src/components/Settings/SonarrModal/index.tsx b/src/components/Settings/SonarrModal/index.tsx index d4237801b..71282dcbf 100644 --- a/src/components/Settings/SonarrModal/index.tsx +++ b/src/components/Settings/SonarrModal/index.tsx @@ -1,7 +1,8 @@ import { PencilIcon, PlusIcon } from '@heroicons/react/solid'; import axios from 'axios'; import { Field, Formik } from 'formik'; -import React, { useCallback, useEffect, useRef, useState } from 'react'; + +import { useCallback, useEffect, useRef, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import type { OnChangeValue } from 'react-select'; import Select from 'react-select'; diff --git a/src/components/Setup/LoginWithPlex.tsx b/src/components/Setup/LoginWithPlex.tsx index b5341ad47..fbb1ff44b 100644 --- a/src/components/Setup/LoginWithPlex.tsx +++ b/src/components/Setup/LoginWithPlex.tsx @@ -1,5 +1,5 @@ import axios from 'axios'; -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useUser } from '../../hooks/useUser'; import PlexLoginButton from '../PlexLoginButton'; diff --git a/src/components/Setup/SetupSteps.tsx b/src/components/Setup/SetupSteps.tsx index 0fa87c928..0529538a0 100644 --- a/src/components/Setup/SetupSteps.tsx +++ b/src/components/Setup/SetupSteps.tsx @@ -1,5 +1,4 @@ import { CheckIcon } from '@heroicons/react/solid'; -import React from 'react'; interface CurrentStep { stepNumber: number; diff --git a/src/components/Setup/index.tsx b/src/components/Setup/index.tsx index 88e4bb3c2..29f7fd8b8 100644 --- a/src/components/Setup/index.tsx +++ b/src/components/Setup/index.tsx @@ -1,6 +1,6 @@ import axios from 'axios'; import { useRouter } from 'next/router'; -import React, { useState } from 'react'; +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import useSWR, { mutate } from 'swr'; import useLocale from '../../hooks/useLocale'; diff --git a/src/components/Slider/index.tsx b/src/components/Slider/index.tsx index b958567ff..90e62f04c 100644 --- a/src/components/Slider/index.tsx +++ b/src/components/Slider/index.tsx @@ -1,7 +1,6 @@ import { ChevronLeftIcon, ChevronRightIcon } from '@heroicons/react/outline'; import { debounce } from 'lodash'; -import type { ReactNode } from 'react'; -import React, { useCallback, useEffect, useRef, useState } from 'react'; +import { useCallback, useEffect, useRef, useState } from 'react'; import { useIntl } from 'react-intl'; import { useSpring } from 'react-spring'; import globalMessages from '../../i18n/globalMessages'; @@ -13,7 +12,7 @@ interface SliderProps { isLoading: boolean; isEmpty: boolean; emptyMessage?: string; - placeholder?: ReactNode; + placeholder?: React.ReactNode; } enum Direction { diff --git a/src/components/StatusBadge/index.tsx b/src/components/StatusBadge/index.tsx index e891328bb..ad1ab034e 100644 --- a/src/components/StatusBadge/index.tsx +++ b/src/components/StatusBadge/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { MediaStatus } from '../../../server/constants/media'; import Spinner from '../../assets/spinner.svg'; diff --git a/src/components/StatusChecker/index.tsx b/src/components/StatusChecker/index.tsx index 0204b8ea9..e0c6299f7 100644 --- a/src/components/StatusChecker/index.tsx +++ b/src/components/StatusChecker/index.tsx @@ -1,5 +1,5 @@ import { RefreshIcon, SparklesIcon } from '@heroicons/react/outline'; -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { StatusResponse } from '../../../server/interfaces/api/settingsInterfaces'; diff --git a/src/components/TitleCard/Placeholder.tsx b/src/components/TitleCard/Placeholder.tsx index 268dd8e62..bf19f467e 100644 --- a/src/components/TitleCard/Placeholder.tsx +++ b/src/components/TitleCard/Placeholder.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - interface PlaceholderProps { canExpand?: boolean; } diff --git a/src/components/TitleCard/TmdbTitleCard.tsx b/src/components/TitleCard/TmdbTitleCard.tsx index 7000a3855..827db1bf1 100644 --- a/src/components/TitleCard/TmdbTitleCard.tsx +++ b/src/components/TitleCard/TmdbTitleCard.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import { useInView } from 'react-intersection-observer'; import useSWR from 'swr'; import TitleCard from '.'; diff --git a/src/components/TitleCard/index.tsx b/src/components/TitleCard/index.tsx index 816a183e2..455c75c49 100644 --- a/src/components/TitleCard/index.tsx +++ b/src/components/TitleCard/index.tsx @@ -1,7 +1,7 @@ import { DownloadIcon } from '@heroicons/react/outline'; import { BellIcon, CheckIcon, ClockIcon } from '@heroicons/react/solid'; import Link from 'next/link'; -import React, { useCallback, useEffect, useState } from 'react'; +import { useCallback, useEffect, useState } from 'react'; import { useIntl } from 'react-intl'; import { MediaStatus } from '../../../server/constants/media'; import type { MediaType } from '../../../server/models/Search'; diff --git a/src/components/Toast/index.tsx b/src/components/Toast/index.tsx index 0d35aec0e..57ffbdba4 100644 --- a/src/components/Toast/index.tsx +++ b/src/components/Toast/index.tsx @@ -5,7 +5,7 @@ import { InformationCircleIcon, } from '@heroicons/react/outline'; import { XIcon } from '@heroicons/react/solid'; -import React from 'react'; + import type { ToastProps } from 'react-toast-notifications'; import Transition from '../Transition'; diff --git a/src/components/ToastContainer/index.tsx b/src/components/ToastContainer/index.tsx index 3f4932da3..55233a9ff 100644 --- a/src/components/ToastContainer/index.tsx +++ b/src/components/ToastContainer/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { ToastContainerProps } from 'react-toast-notifications'; const ToastContainer = ({ hasToasts, ...props }: ToastContainerProps) => { diff --git a/src/components/Transition/index.tsx b/src/components/Transition/index.tsx index 8551fe069..960bcb7ed 100644 --- a/src/components/Transition/index.tsx +++ b/src/components/Transition/index.tsx @@ -1,6 +1,5 @@ -import React from 'react'; import { CSSTransition as ReactCSSTransition } from 'react-transition-group'; -import { useRef, useEffect, useContext } from 'react'; +import React, { useRef, useEffect, useContext } from 'react'; interface CSSTransitionProps { show?: boolean; diff --git a/src/components/TvDetails/TvCast/index.tsx b/src/components/TvDetails/TvCast/index.tsx index cf7d60c42..09e4a8be8 100644 --- a/src/components/TvDetails/TvCast/index.tsx +++ b/src/components/TvDetails/TvCast/index.tsx @@ -1,6 +1,6 @@ import Link from 'next/link'; import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { TvDetails } from '../../../../server/models/Tv'; diff --git a/src/components/TvDetails/TvCrew/index.tsx b/src/components/TvDetails/TvCrew/index.tsx index 621479e3c..2f6890b28 100644 --- a/src/components/TvDetails/TvCrew/index.tsx +++ b/src/components/TvDetails/TvCrew/index.tsx @@ -1,6 +1,6 @@ import Link from 'next/link'; import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { TvDetails } from '../../../../server/models/Tv'; diff --git a/src/components/TvDetails/TvRecommendations.tsx b/src/components/TvDetails/TvRecommendations.tsx index 4f5832d50..db00c0708 100644 --- a/src/components/TvDetails/TvRecommendations.tsx +++ b/src/components/TvDetails/TvRecommendations.tsx @@ -1,6 +1,6 @@ import Link from 'next/link'; import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { TvResult } from '../../../server/models/Search'; diff --git a/src/components/TvDetails/TvSimilar.tsx b/src/components/TvDetails/TvSimilar.tsx index fb2615736..d9b07a9ce 100644 --- a/src/components/TvDetails/TvSimilar.tsx +++ b/src/components/TvDetails/TvSimilar.tsx @@ -1,6 +1,6 @@ import Link from 'next/link'; import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { TvResult } from '../../../server/models/Search'; diff --git a/src/components/TvDetails/index.tsx b/src/components/TvDetails/index.tsx index 2c768e31b..bad8bb58b 100644 --- a/src/components/TvDetails/index.tsx +++ b/src/components/TvDetails/index.tsx @@ -9,7 +9,8 @@ import { hasFlag } from 'country-flag-icons'; import 'country-flag-icons/3x2/flags.css'; import Link from 'next/link'; import { useRouter } from 'next/router'; -import React, { useEffect, useMemo, useState } from 'react'; + +import { useEffect, useMemo, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { RTRating } from '../../../server/api/rottentomatoes'; diff --git a/src/components/UserList/BulkEditModal.tsx b/src/components/UserList/BulkEditModal.tsx index c002a206a..0ef3a16b3 100644 --- a/src/components/UserList/BulkEditModal.tsx +++ b/src/components/UserList/BulkEditModal.tsx @@ -1,6 +1,6 @@ import { PencilIcon } from '@heroicons/react/solid'; import axios from 'axios'; -import React, { useEffect, useState } from 'react'; +import { useEffect, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import type { User } from '../../hooks/useUser'; diff --git a/src/components/UserList/PlexImportModal.tsx b/src/components/UserList/PlexImportModal.tsx index 93f355ecb..5473d1cf9 100644 --- a/src/components/UserList/PlexImportModal.tsx +++ b/src/components/UserList/PlexImportModal.tsx @@ -1,6 +1,7 @@ import { InboxInIcon } from '@heroicons/react/solid'; import axios from 'axios'; -import React, { useState } from 'react'; + +import { useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/UserList/index.tsx b/src/components/UserList/index.tsx index d928f29a1..e07824cec 100644 --- a/src/components/UserList/index.tsx +++ b/src/components/UserList/index.tsx @@ -11,7 +11,8 @@ import axios from 'axios'; import { Field, Form, Formik } from 'formik'; import Link from 'next/link'; import { useRouter } from 'next/router'; -import React, { useEffect, useState } from 'react'; + +import { useEffect, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/UserProfile/ProfileHeader/index.tsx b/src/components/UserProfile/ProfileHeader/index.tsx index fd8428083..7fd980930 100644 --- a/src/components/UserProfile/ProfileHeader/index.tsx +++ b/src/components/UserProfile/ProfileHeader/index.tsx @@ -1,6 +1,6 @@ import { CogIcon, UserIcon } from '@heroicons/react/solid'; import Link from 'next/link'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import type { User } from '../../../hooks/useUser'; import { Permission, useUser } from '../../../hooks/useUser'; diff --git a/src/components/UserProfile/UserSettings/UserGeneralSettings/index.tsx b/src/components/UserProfile/UserSettings/UserGeneralSettings/index.tsx index 27714407e..a68a2d888 100644 --- a/src/components/UserProfile/UserSettings/UserGeneralSettings/index.tsx +++ b/src/components/UserProfile/UserSettings/UserGeneralSettings/index.tsx @@ -2,7 +2,8 @@ import { SaveIcon } from '@heroicons/react/outline'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; import { useRouter } from 'next/router'; -import React, { useEffect, useState } from 'react'; + +import { useEffect, useState } from 'react'; import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsDiscord.tsx b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsDiscord.tsx index 0d03506c8..26f28041c 100644 --- a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsDiscord.tsx +++ b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsDiscord.tsx @@ -2,7 +2,7 @@ import { SaveIcon } from '@heroicons/react/outline'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsEmail.tsx b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsEmail.tsx index a0d0cb1e6..6c6620338 100644 --- a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsEmail.tsx +++ b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsEmail.tsx @@ -2,7 +2,7 @@ import { SaveIcon } from '@heroicons/react/outline'; import axios from 'axios'; import { Form, Formik } from 'formik'; import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushbullet.tsx b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushbullet.tsx index 7c8073189..c28ed656a 100644 --- a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushbullet.tsx +++ b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushbullet.tsx @@ -1,7 +1,7 @@ import axios from 'axios'; import { Form, Formik } from 'formik'; import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushover.tsx b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushover.tsx index 4a1cf0bf2..8435bdf21 100644 --- a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushover.tsx +++ b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushover.tsx @@ -1,7 +1,7 @@ import axios from 'axios'; import { Field, Form, Formik } from 'formik'; import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsTelegram.tsx b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsTelegram.tsx index 497bcc13d..f7f664819 100644 --- a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsTelegram.tsx +++ b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsTelegram.tsx @@ -2,7 +2,7 @@ import { SaveIcon } from '@heroicons/react/outline'; import axios from 'axios'; import { Field, Form, Formik } from 'formik'; import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush.tsx b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush.tsx index 1438a0505..de44818b7 100644 --- a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush.tsx +++ b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush.tsx @@ -2,7 +2,7 @@ import { SaveIcon } from '@heroicons/react/outline'; import axios from 'axios'; import { Form, Formik } from 'formik'; import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR, { mutate } from 'swr'; diff --git a/src/components/UserProfile/UserSettings/UserNotificationSettings/index.tsx b/src/components/UserProfile/UserSettings/UserNotificationSettings/index.tsx index ff2194429..bfdb33b23 100644 --- a/src/components/UserProfile/UserSettings/UserNotificationSettings/index.tsx +++ b/src/components/UserProfile/UserSettings/UserNotificationSettings/index.tsx @@ -1,6 +1,6 @@ import { CloudIcon, MailIcon } from '@heroicons/react/solid'; import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { UserSettingsNotificationsResponse } from '../../../../../server/interfaces/api/userSettingsInterfaces'; diff --git a/src/components/UserProfile/UserSettings/UserPasswordChange/index.tsx b/src/components/UserProfile/UserSettings/UserPasswordChange/index.tsx index bf2756752..b28a42400 100644 --- a/src/components/UserProfile/UserSettings/UserPasswordChange/index.tsx +++ b/src/components/UserProfile/UserSettings/UserPasswordChange/index.tsx @@ -2,7 +2,7 @@ import { SaveIcon } from '@heroicons/react/outline'; import axios from 'axios'; import { Form, Formik } from 'formik'; import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/UserProfile/UserSettings/UserPermissions/index.tsx b/src/components/UserProfile/UserSettings/UserPermissions/index.tsx index b77d4bcc8..77610c630 100644 --- a/src/components/UserProfile/UserSettings/UserPermissions/index.tsx +++ b/src/components/UserProfile/UserSettings/UserPermissions/index.tsx @@ -2,7 +2,7 @@ import { SaveIcon } from '@heroicons/react/outline'; import axios from 'axios'; import { Form, Formik } from 'formik'; import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import { useToasts } from 'react-toast-notifications'; import useSWR from 'swr'; diff --git a/src/components/UserProfile/UserSettings/index.tsx b/src/components/UserProfile/UserSettings/index.tsx index fbed2ba2c..972f4e771 100644 --- a/src/components/UserProfile/UserSettings/index.tsx +++ b/src/components/UserProfile/UserSettings/index.tsx @@ -1,5 +1,5 @@ import { useRouter } from 'next/router'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { UserSettingsNotificationsResponse } from '../../../../server/interfaces/api/userSettingsInterfaces'; diff --git a/src/components/UserProfile/index.tsx b/src/components/UserProfile/index.tsx index 26813a987..a6b4e1e94 100644 --- a/src/components/UserProfile/index.tsx +++ b/src/components/UserProfile/index.tsx @@ -1,7 +1,7 @@ import { ArrowCircleRightIcon } from '@heroicons/react/outline'; import Link from 'next/link'; import { useRouter } from 'next/router'; -import React, { useCallback, useEffect, useState } from 'react'; +import { useCallback, useEffect, useState } from 'react'; import { defineMessages, FormattedNumber, useIntl } from 'react-intl'; import useSWR from 'swr'; import type { diff --git a/src/context/LanguageContext.tsx b/src/context/LanguageContext.tsx index 8917d944b..0cf4d7d79 100644 --- a/src/context/LanguageContext.tsx +++ b/src/context/LanguageContext.tsx @@ -1,4 +1,3 @@ -import type { ReactNode } from 'react'; import React from 'react'; export type AvailableLocale = @@ -133,7 +132,7 @@ export const availableLanguages: AvailableLanguageObject = { export interface LanguageContextProps { locale: AvailableLocale; - children: (locale: string) => ReactNode; + children: (locale: string) => React.ReactNode; setLocale?: React.Dispatch>; } diff --git a/src/context/UserContext.tsx b/src/context/UserContext.tsx index e81cda130..3413df467 100644 --- a/src/context/UserContext.tsx +++ b/src/context/UserContext.tsx @@ -1,5 +1,6 @@ import { useRouter } from 'next/dist/client/router'; -import React, { useEffect, useRef } from 'react'; + +import { useEffect, useRef } from 'react'; import type { User } from '../hooks/useUser'; import { useUser } from '../hooks/useUser'; diff --git a/src/i18n/locale/en.json b/src/i18n/locale/en.json index faaddf155..b0629d3d2 100644 --- a/src/i18n/locale/en.json +++ b/src/i18n/locale/en.json @@ -157,12 +157,14 @@ "components.MovieDetails.MovieCrew.fullcrew": "Full Crew", "components.MovieDetails.budget": "Budget", "components.MovieDetails.cast": "Cast", + "components.MovieDetails.digitalrelease": "Digital Release", "components.MovieDetails.mark4kavailable": "Mark as Available in 4K", "components.MovieDetails.markavailable": "Mark as Available", "components.MovieDetails.originallanguage": "Original Language", "components.MovieDetails.originaltitle": "Original Title", "components.MovieDetails.overview": "Overview", "components.MovieDetails.overviewunavailable": "Overview unavailable.", + "components.MovieDetails.physicalrelease": "Physical Release", "components.MovieDetails.play4konplex": "Play in 4K on Plex", "components.MovieDetails.playonplex": "Play on Plex", "components.MovieDetails.productioncountries": "Production {countryCount, plural, one {Country} other {Countries}}", @@ -175,6 +177,7 @@ "components.MovieDetails.similar": "Similar Titles", "components.MovieDetails.streamingproviders": "Currently Streaming On", "components.MovieDetails.studio": "{studioCount, plural, one {Studio} other {Studios}}", + "components.MovieDetails.theatricalrelease": "Theatrical Release", "components.MovieDetails.viewfullcrew": "View Full Crew", "components.MovieDetails.watchtrailer": "Watch Trailer", "components.NotificationTypeSelector.adminissuecommentDescription": "Get notified when other users comment on issues.", diff --git a/src/pages/404.tsx b/src/pages/404.tsx index eff80720d..da74cfe8f 100644 --- a/src/pages/404.tsx +++ b/src/pages/404.tsx @@ -1,6 +1,6 @@ import { ArrowCircleRightIcon } from '@heroicons/react/outline'; import Link from 'next/link'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import PageTitle from '../components/Common/PageTitle'; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 0abbd55f0..aeef14c02 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -2,7 +2,8 @@ import axios from 'axios'; import type { AppInitialProps, AppProps } from 'next/app'; import App from 'next/app'; import Head from 'next/head'; -import React, { useEffect, useState } from 'react'; + +import { useEffect, useState } from 'react'; import { IntlProvider } from 'react-intl'; import { ToastProvider } from 'react-toast-notifications'; import { SWRConfig } from 'swr'; diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index 4027ec489..32df8a3b5 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -1,6 +1,5 @@ import type { DocumentContext, DocumentInitialProps } from 'next/document'; import Document, { Head, Html, Main, NextScript } from 'next/document'; -import React from 'react'; class MyDocument extends Document { static async getInitialProps( diff --git a/src/pages/_error.tsx b/src/pages/_error.tsx index 0241bf7f0..cf84a918f 100644 --- a/src/pages/_error.tsx +++ b/src/pages/_error.tsx @@ -1,7 +1,7 @@ import { ArrowCircleRightIcon } from '@heroicons/react/outline'; import type { NextPage } from 'next'; import Link from 'next/link'; -import React from 'react'; + import { defineMessages, useIntl } from 'react-intl'; import PageTitle from '../components/Common/PageTitle'; import type { Undefinable } from '../utils/typeHelpers'; diff --git a/src/pages/collection/[collectionId]/index.tsx b/src/pages/collection/[collectionId]/index.tsx index 4e67116a7..7a0848dc1 100644 --- a/src/pages/collection/[collectionId]/index.tsx +++ b/src/pages/collection/[collectionId]/index.tsx @@ -1,6 +1,6 @@ import axios from 'axios'; import type { GetServerSideProps, NextPage } from 'next'; -import React from 'react'; + import type { Collection } from '../../../../server/models/Collection'; import CollectionDetails from '../../../components/CollectionDetails'; diff --git a/src/pages/discover/movies/genre/[genreId]/index.tsx b/src/pages/discover/movies/genre/[genreId]/index.tsx index f9a819ec2..01dc48375 100644 --- a/src/pages/discover/movies/genre/[genreId]/index.tsx +++ b/src/pages/discover/movies/genre/[genreId]/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import DiscoverMovieGenre from '../../../../../components/Discover/DiscoverMovieGenre'; diff --git a/src/pages/discover/movies/genres.tsx b/src/pages/discover/movies/genres.tsx index 212275676..db6e49655 100644 --- a/src/pages/discover/movies/genres.tsx +++ b/src/pages/discover/movies/genres.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import MovieGenreList from '../../../components/Discover/MovieGenreList'; diff --git a/src/pages/discover/movies/index.tsx b/src/pages/discover/movies/index.tsx index e7bc69dad..b20c1203c 100644 --- a/src/pages/discover/movies/index.tsx +++ b/src/pages/discover/movies/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import DiscoverMovies from '../../../components/Discover/DiscoverMovies'; diff --git a/src/pages/discover/movies/language/[language]/index.tsx b/src/pages/discover/movies/language/[language]/index.tsx index ad2cbd9d4..8445fb8e3 100644 --- a/src/pages/discover/movies/language/[language]/index.tsx +++ b/src/pages/discover/movies/language/[language]/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import DiscoverMovieLanguage from '../../../../../components/Discover/DiscoverMovieLanguage'; diff --git a/src/pages/discover/movies/studio/[studioId]/index.tsx b/src/pages/discover/movies/studio/[studioId]/index.tsx index 5c70fd3cd..84cfb4b5e 100644 --- a/src/pages/discover/movies/studio/[studioId]/index.tsx +++ b/src/pages/discover/movies/studio/[studioId]/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import DiscoverMovieStudio from '../../../../../components/Discover/DiscoverStudio'; diff --git a/src/pages/discover/movies/upcoming.tsx b/src/pages/discover/movies/upcoming.tsx index 23fc0b005..82f25ca43 100644 --- a/src/pages/discover/movies/upcoming.tsx +++ b/src/pages/discover/movies/upcoming.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import UpcomingMovies from '../../../components/Discover/Upcoming'; diff --git a/src/pages/discover/trending.tsx b/src/pages/discover/trending.tsx index 1ab2e9512..da08fb1b9 100644 --- a/src/pages/discover/trending.tsx +++ b/src/pages/discover/trending.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import Trending from '../../components/Discover/Trending'; diff --git a/src/pages/discover/tv/genre/[genreId]/index.tsx b/src/pages/discover/tv/genre/[genreId]/index.tsx index e9e844b13..0b5261d32 100644 --- a/src/pages/discover/tv/genre/[genreId]/index.tsx +++ b/src/pages/discover/tv/genre/[genreId]/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import DiscoverTvGenre from '../../../../../components/Discover/DiscoverTvGenre'; diff --git a/src/pages/discover/tv/genres.tsx b/src/pages/discover/tv/genres.tsx index 76f0cb7d2..1c434189b 100644 --- a/src/pages/discover/tv/genres.tsx +++ b/src/pages/discover/tv/genres.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import TvGenreList from '../../../components/Discover/TvGenreList'; diff --git a/src/pages/discover/tv/index.tsx b/src/pages/discover/tv/index.tsx index b0b3d9bca..5e7ba55d9 100644 --- a/src/pages/discover/tv/index.tsx +++ b/src/pages/discover/tv/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import DiscoverTv from '../../../components/Discover/DiscoverTv'; diff --git a/src/pages/discover/tv/language/[language]/index.tsx b/src/pages/discover/tv/language/[language]/index.tsx index 5fc6be784..ba59bc589 100644 --- a/src/pages/discover/tv/language/[language]/index.tsx +++ b/src/pages/discover/tv/language/[language]/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import DiscoverTvLanguage from '../../../../../components/Discover/DiscoverTvLanguage'; diff --git a/src/pages/discover/tv/network/[networkId]/index.tsx b/src/pages/discover/tv/network/[networkId]/index.tsx index cde53231b..e5a442c67 100644 --- a/src/pages/discover/tv/network/[networkId]/index.tsx +++ b/src/pages/discover/tv/network/[networkId]/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import DiscoverNetwork from '../../../../../components/Discover/DiscoverNetwork'; diff --git a/src/pages/discover/tv/upcoming.tsx b/src/pages/discover/tv/upcoming.tsx index f1b2a858d..56d4ac773 100644 --- a/src/pages/discover/tv/upcoming.tsx +++ b/src/pages/discover/tv/upcoming.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import DiscoverTvUpcoming from '../../../components/Discover/DiscoverTvUpcoming'; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 1c15c0bd4..86c53dde3 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import Discover from '../components/Discover'; diff --git a/src/pages/issues/[issueId]/index.tsx b/src/pages/issues/[issueId]/index.tsx index 499de059f..5d9c18112 100644 --- a/src/pages/issues/[issueId]/index.tsx +++ b/src/pages/issues/[issueId]/index.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import IssueDetails from '../../../components/IssueDetails'; import useRouteGuard from '../../../hooks/useRouteGuard'; import { Permission } from '../../../hooks/useUser'; diff --git a/src/pages/issues/index.tsx b/src/pages/issues/index.tsx index deda3a317..4dc6e888a 100644 --- a/src/pages/issues/index.tsx +++ b/src/pages/issues/index.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import IssueList from '../../components/IssueList'; import useRouteGuard from '../../hooks/useRouteGuard'; import { Permission } from '../../hooks/useUser'; diff --git a/src/pages/login/index.tsx b/src/pages/login/index.tsx index 25c21909a..90c4b5dbb 100644 --- a/src/pages/login/index.tsx +++ b/src/pages/login/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import Login from '../../components/Login'; diff --git a/src/pages/login/plex/loading.tsx b/src/pages/login/plex/loading.tsx index 487463381..e76617141 100644 --- a/src/pages/login/plex/loading.tsx +++ b/src/pages/login/plex/loading.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import LoadingSpinner from '../../../components/Common/LoadingSpinner'; const PlexLoading = () => { diff --git a/src/pages/movie/[movieId]/cast.tsx b/src/pages/movie/[movieId]/cast.tsx index e0c5fbf3f..f2ee8f258 100644 --- a/src/pages/movie/[movieId]/cast.tsx +++ b/src/pages/movie/[movieId]/cast.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import MovieCast from '../../../components/MovieDetails/MovieCast'; const MovieCastPage: NextPage = () => { diff --git a/src/pages/movie/[movieId]/crew.tsx b/src/pages/movie/[movieId]/crew.tsx index c69eb85b2..f62f258db 100644 --- a/src/pages/movie/[movieId]/crew.tsx +++ b/src/pages/movie/[movieId]/crew.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import MovieCrew from '../../../components/MovieDetails/MovieCrew'; const MovieCrewPage: NextPage = () => { diff --git a/src/pages/movie/[movieId]/index.tsx b/src/pages/movie/[movieId]/index.tsx index 736bbc872..9951dc86e 100644 --- a/src/pages/movie/[movieId]/index.tsx +++ b/src/pages/movie/[movieId]/index.tsx @@ -1,6 +1,6 @@ import axios from 'axios'; import type { NextPage } from 'next'; -import React from 'react'; + import type { MovieDetails as MovieDetailsType } from '../../../../server/models/Movie'; import MovieDetails from '../../../components/MovieDetails'; diff --git a/src/pages/movie/[movieId]/recommendations.tsx b/src/pages/movie/[movieId]/recommendations.tsx index f1c3b81cf..98a0f7904 100644 --- a/src/pages/movie/[movieId]/recommendations.tsx +++ b/src/pages/movie/[movieId]/recommendations.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import MovieRecommendations from '../../../components/MovieDetails/MovieRecommendations'; diff --git a/src/pages/movie/[movieId]/similar.tsx b/src/pages/movie/[movieId]/similar.tsx index 76a227b53..80f60e849 100644 --- a/src/pages/movie/[movieId]/similar.tsx +++ b/src/pages/movie/[movieId]/similar.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import MovieSimilar from '../../../components/MovieDetails/MovieSimilar'; diff --git a/src/pages/person/[personId]/index.tsx b/src/pages/person/[personId]/index.tsx index b08e43d76..f3d9bc183 100644 --- a/src/pages/person/[personId]/index.tsx +++ b/src/pages/person/[personId]/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import PersonDetails from '../../../components/PersonDetails'; diff --git a/src/pages/profile/index.tsx b/src/pages/profile/index.tsx index 89a137c31..21c3a260e 100644 --- a/src/pages/profile/index.tsx +++ b/src/pages/profile/index.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserProfile from '../../components/UserProfile'; const UserPage: NextPage = () => { diff --git a/src/pages/profile/settings/index.tsx b/src/pages/profile/settings/index.tsx index 79b03c385..ddc6881c9 100644 --- a/src/pages/profile/settings/index.tsx +++ b/src/pages/profile/settings/index.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../components/UserProfile/UserSettings'; import UserGeneralSettings from '../../../components/UserProfile/UserSettings/UserGeneralSettings'; diff --git a/src/pages/profile/settings/main.tsx b/src/pages/profile/settings/main.tsx index 212a105d6..7363ad6b8 100644 --- a/src/pages/profile/settings/main.tsx +++ b/src/pages/profile/settings/main.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../components/UserProfile/UserSettings'; import UserGeneralSettings from '../../../components/UserProfile/UserSettings/UserGeneralSettings'; diff --git a/src/pages/profile/settings/notifications/discord.tsx b/src/pages/profile/settings/notifications/discord.tsx index 30442dc54..cabc78948 100644 --- a/src/pages/profile/settings/notifications/discord.tsx +++ b/src/pages/profile/settings/notifications/discord.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../../components/UserProfile/UserSettings'; import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings'; import UserNotificationsDiscord from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsDiscord'; diff --git a/src/pages/profile/settings/notifications/email.tsx b/src/pages/profile/settings/notifications/email.tsx index b101717eb..ebbd19356 100644 --- a/src/pages/profile/settings/notifications/email.tsx +++ b/src/pages/profile/settings/notifications/email.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../../components/UserProfile/UserSettings'; import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings'; import UserNotificationsEmail from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsEmail'; diff --git a/src/pages/profile/settings/notifications/pushbullet.tsx b/src/pages/profile/settings/notifications/pushbullet.tsx index 10cf6a765..fe262b109 100644 --- a/src/pages/profile/settings/notifications/pushbullet.tsx +++ b/src/pages/profile/settings/notifications/pushbullet.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../../components/UserProfile/UserSettings'; import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings'; import UserNotificationsPushbullet from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushbullet'; diff --git a/src/pages/profile/settings/notifications/pushover.tsx b/src/pages/profile/settings/notifications/pushover.tsx index 4eba87ddc..8ee1e4c44 100644 --- a/src/pages/profile/settings/notifications/pushover.tsx +++ b/src/pages/profile/settings/notifications/pushover.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../../components/UserProfile/UserSettings'; import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings'; import UserNotificationsPushover from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushover'; diff --git a/src/pages/profile/settings/notifications/telegram.tsx b/src/pages/profile/settings/notifications/telegram.tsx index e584be9f7..e7459ccab 100644 --- a/src/pages/profile/settings/notifications/telegram.tsx +++ b/src/pages/profile/settings/notifications/telegram.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../../components/UserProfile/UserSettings'; import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings'; import UserNotificationsTelegram from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsTelegram'; diff --git a/src/pages/profile/settings/notifications/webpush.tsx b/src/pages/profile/settings/notifications/webpush.tsx index 65696fa28..3a4a7272d 100644 --- a/src/pages/profile/settings/notifications/webpush.tsx +++ b/src/pages/profile/settings/notifications/webpush.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../../components/UserProfile/UserSettings'; import UserNotificationSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings'; import UserWebPushSettings from '../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush'; diff --git a/src/pages/profile/settings/password.tsx b/src/pages/profile/settings/password.tsx index 7e0a1ec3c..12ea2765e 100644 --- a/src/pages/profile/settings/password.tsx +++ b/src/pages/profile/settings/password.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../components/UserProfile/UserSettings'; import UserPasswordChange from '../../../components/UserProfile/UserSettings/UserPasswordChange'; diff --git a/src/pages/profile/settings/permissions.tsx b/src/pages/profile/settings/permissions.tsx index 9572c5c93..a3b66c6ea 100644 --- a/src/pages/profile/settings/permissions.tsx +++ b/src/pages/profile/settings/permissions.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../components/UserProfile/UserSettings'; import UserPermissions from '../../../components/UserProfile/UserSettings/UserPermissions'; diff --git a/src/pages/requests/index.tsx b/src/pages/requests/index.tsx index 225331ed2..03967cb4f 100644 --- a/src/pages/requests/index.tsx +++ b/src/pages/requests/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import RequestList from '../../components/RequestList'; diff --git a/src/pages/resetpassword/[guid]/index.tsx b/src/pages/resetpassword/[guid]/index.tsx index bf5ac4876..7220fd9ad 100644 --- a/src/pages/resetpassword/[guid]/index.tsx +++ b/src/pages/resetpassword/[guid]/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import ResetPassword from '../../../components/ResetPassword'; diff --git a/src/pages/resetpassword/index.tsx b/src/pages/resetpassword/index.tsx index f14ed663f..fb1648f06 100644 --- a/src/pages/resetpassword/index.tsx +++ b/src/pages/resetpassword/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import RequestResetLink from '../../components/ResetPassword/RequestResetLink'; diff --git a/src/pages/search.tsx b/src/pages/search.tsx index 55f95f136..6db1d6d2d 100644 --- a/src/pages/search.tsx +++ b/src/pages/search.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import Search from '../components/Search'; const SearchPage = () => { diff --git a/src/pages/settings/about.tsx b/src/pages/settings/about.tsx index 9bf703ed2..5f735f049 100644 --- a/src/pages/settings/about.tsx +++ b/src/pages/settings/about.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import SettingsAbout from '../../components/Settings/SettingsAbout'; import SettingsLayout from '../../components/Settings/SettingsLayout'; import useRouteGuard from '../../hooks/useRouteGuard'; diff --git a/src/pages/settings/index.tsx b/src/pages/settings/index.tsx index 3242214d4..5e30a409e 100644 --- a/src/pages/settings/index.tsx +++ b/src/pages/settings/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import SettingsLayout from '../../components/Settings/SettingsLayout'; import SettingsMain from '../../components/Settings/SettingsMain'; diff --git a/src/pages/settings/jobs.tsx b/src/pages/settings/jobs.tsx index af48f85b3..d59d0e26b 100644 --- a/src/pages/settings/jobs.tsx +++ b/src/pages/settings/jobs.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import SettingsJobs from '../../components/Settings/SettingsJobsCache'; import SettingsLayout from '../../components/Settings/SettingsLayout'; import useRouteGuard from '../../hooks/useRouteGuard'; diff --git a/src/pages/settings/logs.tsx b/src/pages/settings/logs.tsx index 15c994f43..d670d76b9 100644 --- a/src/pages/settings/logs.tsx +++ b/src/pages/settings/logs.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import SettingsLayout from '../../components/Settings/SettingsLayout'; import SettingsLogs from '../../components/Settings/SettingsLogs'; import useRouteGuard from '../../hooks/useRouteGuard'; diff --git a/src/pages/settings/main.tsx b/src/pages/settings/main.tsx index facca97c9..4999d2878 100644 --- a/src/pages/settings/main.tsx +++ b/src/pages/settings/main.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import SettingsLayout from '../../components/Settings/SettingsLayout'; import SettingsMain from '../../components/Settings/SettingsMain'; diff --git a/src/pages/settings/notifications/discord.tsx b/src/pages/settings/notifications/discord.tsx index 2cb2d2117..e087941f5 100644 --- a/src/pages/settings/notifications/discord.tsx +++ b/src/pages/settings/notifications/discord.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import NotificationsDiscord from '../../../components/Settings/Notifications/NotificationsDiscord'; import SettingsLayout from '../../../components/Settings/SettingsLayout'; import SettingsNotifications from '../../../components/Settings/SettingsNotifications'; diff --git a/src/pages/settings/notifications/email.tsx b/src/pages/settings/notifications/email.tsx index 3ef415ed7..66d336404 100644 --- a/src/pages/settings/notifications/email.tsx +++ b/src/pages/settings/notifications/email.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import NotificationsEmail from '../../../components/Settings/Notifications/NotificationsEmail'; import SettingsLayout from '../../../components/Settings/SettingsLayout'; import SettingsNotifications from '../../../components/Settings/SettingsNotifications'; diff --git a/src/pages/settings/notifications/gotify.tsx b/src/pages/settings/notifications/gotify.tsx index 4cc5541bb..83f48025d 100644 --- a/src/pages/settings/notifications/gotify.tsx +++ b/src/pages/settings/notifications/gotify.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import NotificationsGotify from '../../../components/Settings/Notifications/NotificationsGotify'; import SettingsLayout from '../../../components/Settings/SettingsLayout'; import SettingsNotifications from '../../../components/Settings/SettingsNotifications'; diff --git a/src/pages/settings/notifications/lunasea.tsx b/src/pages/settings/notifications/lunasea.tsx index 185621a6c..7ddef083f 100644 --- a/src/pages/settings/notifications/lunasea.tsx +++ b/src/pages/settings/notifications/lunasea.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import NotificationsLunaSea from '../../../components/Settings/Notifications/NotificationsLunaSea'; import SettingsLayout from '../../../components/Settings/SettingsLayout'; import SettingsNotifications from '../../../components/Settings/SettingsNotifications'; diff --git a/src/pages/settings/notifications/pushbullet.tsx b/src/pages/settings/notifications/pushbullet.tsx index 410890bee..d09a529cc 100644 --- a/src/pages/settings/notifications/pushbullet.tsx +++ b/src/pages/settings/notifications/pushbullet.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import NotificationsPushbullet from '../../../components/Settings/Notifications/NotificationsPushbullet'; import SettingsLayout from '../../../components/Settings/SettingsLayout'; import SettingsNotifications from '../../../components/Settings/SettingsNotifications'; diff --git a/src/pages/settings/notifications/pushover.tsx b/src/pages/settings/notifications/pushover.tsx index ba21b6e9c..d9018255f 100644 --- a/src/pages/settings/notifications/pushover.tsx +++ b/src/pages/settings/notifications/pushover.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import NotificationsPushover from '../../../components/Settings/Notifications/NotificationsPushover'; import SettingsLayout from '../../../components/Settings/SettingsLayout'; import SettingsNotifications from '../../../components/Settings/SettingsNotifications'; diff --git a/src/pages/settings/notifications/slack.tsx b/src/pages/settings/notifications/slack.tsx index ffae3bbb8..0230a6214 100644 --- a/src/pages/settings/notifications/slack.tsx +++ b/src/pages/settings/notifications/slack.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import NotificationsSlack from '../../../components/Settings/Notifications/NotificationsSlack'; import SettingsLayout from '../../../components/Settings/SettingsLayout'; import SettingsNotifications from '../../../components/Settings/SettingsNotifications'; diff --git a/src/pages/settings/notifications/telegram.tsx b/src/pages/settings/notifications/telegram.tsx index a960d4ea7..6de159a8f 100644 --- a/src/pages/settings/notifications/telegram.tsx +++ b/src/pages/settings/notifications/telegram.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import NotificationsTelegram from '../../../components/Settings/Notifications/NotificationsTelegram'; import SettingsLayout from '../../../components/Settings/SettingsLayout'; import SettingsNotifications from '../../../components/Settings/SettingsNotifications'; diff --git a/src/pages/settings/notifications/webhook.tsx b/src/pages/settings/notifications/webhook.tsx index f0a947f7f..7556b8472 100644 --- a/src/pages/settings/notifications/webhook.tsx +++ b/src/pages/settings/notifications/webhook.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import NotificationsWebhook from '../../../components/Settings/Notifications/NotificationsWebhook'; import SettingsLayout from '../../../components/Settings/SettingsLayout'; import SettingsNotifications from '../../../components/Settings/SettingsNotifications'; diff --git a/src/pages/settings/notifications/webpush.tsx b/src/pages/settings/notifications/webpush.tsx index 3bd9bbbb8..2ebb47a2b 100644 --- a/src/pages/settings/notifications/webpush.tsx +++ b/src/pages/settings/notifications/webpush.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import NotificationsWebPush from '../../../components/Settings/Notifications/NotificationsWebPush'; import SettingsLayout from '../../../components/Settings/SettingsLayout'; import SettingsNotifications from '../../../components/Settings/SettingsNotifications'; diff --git a/src/pages/settings/plex.tsx b/src/pages/settings/plex.tsx index e13bd1b3a..18da3d136 100644 --- a/src/pages/settings/plex.tsx +++ b/src/pages/settings/plex.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import SettingsLayout from '../../components/Settings/SettingsLayout'; import SettingsPlex from '../../components/Settings/SettingsPlex'; import useRouteGuard from '../../hooks/useRouteGuard'; diff --git a/src/pages/settings/services.tsx b/src/pages/settings/services.tsx index 20a52c491..af9f6d2ac 100644 --- a/src/pages/settings/services.tsx +++ b/src/pages/settings/services.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import SettingsLayout from '../../components/Settings/SettingsLayout'; import SettingsServices from '../../components/Settings/SettingsServices'; import useRouteGuard from '../../hooks/useRouteGuard'; diff --git a/src/pages/settings/users.tsx b/src/pages/settings/users.tsx index ca99f4256..3e93be1bd 100644 --- a/src/pages/settings/users.tsx +++ b/src/pages/settings/users.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import SettingsLayout from '../../components/Settings/SettingsLayout'; import SettingsUsers from '../../components/Settings/SettingsUsers'; diff --git a/src/pages/setup.tsx b/src/pages/setup.tsx index a32fdb208..5f255e2b6 100644 --- a/src/pages/setup.tsx +++ b/src/pages/setup.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import Setup from '../components/Setup'; diff --git a/src/pages/tv/[tvId]/cast.tsx b/src/pages/tv/[tvId]/cast.tsx index 7c0fe83d0..26dfa11b0 100644 --- a/src/pages/tv/[tvId]/cast.tsx +++ b/src/pages/tv/[tvId]/cast.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import TvCast from '../../../components/TvDetails/TvCast'; const TvCastPage: NextPage = () => { diff --git a/src/pages/tv/[tvId]/crew.tsx b/src/pages/tv/[tvId]/crew.tsx index fcf3fca9a..014efe11c 100644 --- a/src/pages/tv/[tvId]/crew.tsx +++ b/src/pages/tv/[tvId]/crew.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import TvCrew from '../../../components/TvDetails/TvCrew'; const TvCrewPage: NextPage = () => { diff --git a/src/pages/tv/[tvId]/index.tsx b/src/pages/tv/[tvId]/index.tsx index 032c87310..4b83b3c2c 100644 --- a/src/pages/tv/[tvId]/index.tsx +++ b/src/pages/tv/[tvId]/index.tsx @@ -1,6 +1,6 @@ import axios from 'axios'; import type { NextPage } from 'next'; -import React from 'react'; + import type { TvDetails as TvDetailsType } from '../../../../server/models/Tv'; import TvDetails from '../../../components/TvDetails'; diff --git a/src/pages/tv/[tvId]/recommendations.tsx b/src/pages/tv/[tvId]/recommendations.tsx index 02028892d..e83e87e9e 100644 --- a/src/pages/tv/[tvId]/recommendations.tsx +++ b/src/pages/tv/[tvId]/recommendations.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import TvRecommendations from '../../../components/TvDetails/TvRecommendations'; diff --git a/src/pages/tv/[tvId]/similar.tsx b/src/pages/tv/[tvId]/similar.tsx index 107edc524..17b66fd10 100644 --- a/src/pages/tv/[tvId]/similar.tsx +++ b/src/pages/tv/[tvId]/similar.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import TvSimilar from '../../../components/TvDetails/TvSimilar'; diff --git a/src/pages/users/[userId]/index.tsx b/src/pages/users/[userId]/index.tsx index ebc39c218..04c0e460b 100644 --- a/src/pages/users/[userId]/index.tsx +++ b/src/pages/users/[userId]/index.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserProfile from '../../../components/UserProfile'; const UserPage: NextPage = () => { diff --git a/src/pages/users/[userId]/requests.tsx b/src/pages/users/[userId]/requests.tsx index f1877f860..4ffb0e553 100644 --- a/src/pages/users/[userId]/requests.tsx +++ b/src/pages/users/[userId]/requests.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import RequestList from '../../../components/RequestList'; import useRouteGuard from '../../../hooks/useRouteGuard'; import { Permission } from '../../../hooks/useUser'; diff --git a/src/pages/users/[userId]/settings/index.tsx b/src/pages/users/[userId]/settings/index.tsx index 011616bca..862ad7b2d 100644 --- a/src/pages/users/[userId]/settings/index.tsx +++ b/src/pages/users/[userId]/settings/index.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../../components/UserProfile/UserSettings'; import UserGeneralSettings from '../../../../components/UserProfile/UserSettings/UserGeneralSettings'; import useRouteGuard from '../../../../hooks/useRouteGuard'; diff --git a/src/pages/users/[userId]/settings/main.tsx b/src/pages/users/[userId]/settings/main.tsx index 5db134ace..e0764fedb 100644 --- a/src/pages/users/[userId]/settings/main.tsx +++ b/src/pages/users/[userId]/settings/main.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../../components/UserProfile/UserSettings'; import UserGeneralSettings from '../../../../components/UserProfile/UserSettings/UserGeneralSettings'; import useRouteGuard from '../../../../hooks/useRouteGuard'; diff --git a/src/pages/users/[userId]/settings/notifications/discord.tsx b/src/pages/users/[userId]/settings/notifications/discord.tsx index 8a7e9d39b..837d88f9c 100644 --- a/src/pages/users/[userId]/settings/notifications/discord.tsx +++ b/src/pages/users/[userId]/settings/notifications/discord.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../../../components/UserProfile/UserSettings'; import UserNotificationSettings from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings'; import UserNotificationsDiscord from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsDiscord'; diff --git a/src/pages/users/[userId]/settings/notifications/email.tsx b/src/pages/users/[userId]/settings/notifications/email.tsx index e81bd50ce..bda08b3a0 100644 --- a/src/pages/users/[userId]/settings/notifications/email.tsx +++ b/src/pages/users/[userId]/settings/notifications/email.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../../../components/UserProfile/UserSettings'; import UserNotificationSettings from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings'; import UserNotificationsEmail from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsEmail'; diff --git a/src/pages/users/[userId]/settings/notifications/pushbullet.tsx b/src/pages/users/[userId]/settings/notifications/pushbullet.tsx index 3e7bf8a7a..30e17e05d 100644 --- a/src/pages/users/[userId]/settings/notifications/pushbullet.tsx +++ b/src/pages/users/[userId]/settings/notifications/pushbullet.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../../../components/UserProfile/UserSettings'; import UserNotificationSettings from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings'; import UserNotificationsPushbullet from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushbullet'; diff --git a/src/pages/users/[userId]/settings/notifications/pushover.tsx b/src/pages/users/[userId]/settings/notifications/pushover.tsx index a3f57150c..18dd034f0 100644 --- a/src/pages/users/[userId]/settings/notifications/pushover.tsx +++ b/src/pages/users/[userId]/settings/notifications/pushover.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../../../components/UserProfile/UserSettings'; import UserNotificationSettings from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings'; import UserNotificationsPushover from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushover'; diff --git a/src/pages/users/[userId]/settings/notifications/telegram.tsx b/src/pages/users/[userId]/settings/notifications/telegram.tsx index d7815fdf4..4f6e16844 100644 --- a/src/pages/users/[userId]/settings/notifications/telegram.tsx +++ b/src/pages/users/[userId]/settings/notifications/telegram.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../../../components/UserProfile/UserSettings'; import UserNotificationSettings from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings'; import UserNotificationsTelegram from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsTelegram'; diff --git a/src/pages/users/[userId]/settings/notifications/webpush.tsx b/src/pages/users/[userId]/settings/notifications/webpush.tsx index 2080dc84d..4a58ed224 100644 --- a/src/pages/users/[userId]/settings/notifications/webpush.tsx +++ b/src/pages/users/[userId]/settings/notifications/webpush.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../../../components/UserProfile/UserSettings'; import UserNotificationSettings from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings'; import UserWebPushSettings from '../../../../../components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush'; diff --git a/src/pages/users/[userId]/settings/password.tsx b/src/pages/users/[userId]/settings/password.tsx index 239f07a25..b14cd4c28 100644 --- a/src/pages/users/[userId]/settings/password.tsx +++ b/src/pages/users/[userId]/settings/password.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../../components/UserProfile/UserSettings'; import UserPasswordChange from '../../../../components/UserProfile/UserSettings/UserPasswordChange'; import useRouteGuard from '../../../../hooks/useRouteGuard'; diff --git a/src/pages/users/[userId]/settings/permissions.tsx b/src/pages/users/[userId]/settings/permissions.tsx index 06fcf4d13..005573490 100644 --- a/src/pages/users/[userId]/settings/permissions.tsx +++ b/src/pages/users/[userId]/settings/permissions.tsx @@ -1,5 +1,5 @@ import type { NextPage } from 'next'; -import React from 'react'; + import UserSettings from '../../../../components/UserProfile/UserSettings'; import UserPermissions from '../../../../components/UserProfile/UserSettings/UserPermissions'; import useRouteGuard from '../../../../hooks/useRouteGuard'; diff --git a/src/pages/users/index.tsx b/src/pages/users/index.tsx index 25351b0ea..dd46b55ce 100644 --- a/src/pages/users/index.tsx +++ b/src/pages/users/index.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import type { NextPage } from 'next'; import UserList from '../../components/UserList'; import useRouteGuard from '../../hooks/useRouteGuard'; diff --git a/yarn.lock b/yarn.lock index 33f075550..723cb3c30 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1169,7 +1169,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/runtime@^7.18.9": +"@babel/runtime@^7.18.3", "@babel/runtime@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a" integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw== @@ -2359,6 +2359,11 @@ dependencies: "@octokit/openapi-types" "^11.2.0" +"@popperjs/core@^2.11.5": + version "2.11.6" + resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.6.tgz#cee20bd55e68a1720bdab363ecf0c821ded4cd45" + integrity sha512-50/17A98tWUfQ176raKiOGXuYpLyyVMkxxG6oylzL3BPOlA6ADGdK7EYunSa4I064xerltq9TGXs8HmOk5E+vw== + "@react-spring/animated@~9.5.2": version "9.5.2" resolved "https://registry.yarnpkg.com/@react-spring/animated/-/animated-9.5.2.tgz#42785b4f369d9715e9ee32c04b78483e7bb85489" @@ -8095,7 +8100,7 @@ longest@^2.0.1: resolved "https://registry.yarnpkg.com/longest/-/longest-2.0.1.tgz#781e183296aa94f6d4d916dc335d0d17aefa23f8" integrity sha512-Ajzxb8CM6WAnFjgiloPsI3bF+WCxcvhdIG3KNA2KN962+tdBsHcuQ4k4qX/EcS/2CRkcc0iAkR956Nib6aXU/Q== -loose-envify@^1.1.0, loose-envify@^1.4.0: +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -10238,6 +10243,11 @@ react-fast-compare@^2.0.1: resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-2.0.4.tgz#e84b4d455b0fec113e0402c329352715196f81f9" integrity sha512-suNP+J1VU1MWFKcyt7RtjiSWUjvidmQSlqu+eHslq+342xCbGTYmC0mEhPCOHxlW0CywylOC1u2DFAT+bv4dBw== +react-fast-compare@^3.0.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/react-fast-compare/-/react-fast-compare-3.2.0.tgz#641a9da81b6a6320f270e89724fb45a0b39e43bb" + integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA== + react-intersection-observer@9.4.0: version "9.4.0" resolved "https://registry.yarnpkg.com/react-intersection-observer/-/react-intersection-observer-9.4.0.tgz#f6b6e616e625f9bf255857c5cba9dbf7b1825ec7" @@ -10290,6 +10300,23 @@ react-markdown@8.0.3: unist-util-visit "^4.0.0" vfile "^5.0.0" +react-popper-tooltip@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/react-popper-tooltip/-/react-popper-tooltip-4.4.2.tgz#0dc4894b8e00ba731f89bd2d30584f6032ec6163" + integrity sha512-y48r0mpzysRTZAIh8m2kpZ8S1YPNqGtQPDrlXYSGvDS1c1GpG/NUXbsbIdfbhXfmSaRJuTcaT6N1q3CKuHRVbg== + dependencies: + "@babel/runtime" "^7.18.3" + "@popperjs/core" "^2.11.5" + react-popper "^2.3.0" + +react-popper@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/react-popper/-/react-popper-2.3.0.tgz#17891c620e1320dce318bad9fede46a5f71c70ba" + integrity sha512-e1hj8lL3uM+sgSR4Lxzn5h1GxBlpa4CQz0XLF8kx4MDrDRWY0Ena4c97PUeSX9i5W3UAfDP0z0FXCTQkoXUl3Q== + dependencies: + react-fast-compare "^3.0.1" + warning "^4.0.2" + react-select@5.4.0: version "5.4.0" resolved "https://registry.yarnpkg.com/react-select/-/react-select-5.4.0.tgz#81f6ac73906126706f104751ee14437bd16798f4" @@ -12266,6 +12293,13 @@ walk-up-path@^1.0.0: resolved "https://registry.yarnpkg.com/walk-up-path/-/walk-up-path-1.0.0.tgz#d4745e893dd5fd0dbb58dd0a4c6a33d9c9fec53e" integrity sha512-hwj/qMDUEjCU5h0xr90KGCf0tg0/LgJbmOWgrWKYlcJZM7XvquvUJZ0G/HMGr7F7OQMOUuPHWP9JpriinkAlkg== +warning@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/warning/-/warning-4.0.3.tgz#16e9e077eb8a86d6af7d64aa1e05fd85b4678ca3" + integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w== + dependencies: + loose-envify "^1.0.0" + wcwidth@^1.0.0, wcwidth@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"