From e5d8c93ab8c96464fb6e7b08e80655d816d8b4b4 Mon Sep 17 00:00:00 2001
From: Ryan Cohen
Date: Thu, 18 Aug 2022 17:05:58 +0900
Subject: [PATCH] chore(deps): update react to 18 (#2943)
---
next.config.js | 3 +
package.json | 17 +-
src/components/AppDataWarning/index.tsx | 8 +-
src/components/CollectionDetails/index.tsx | 4 +-
src/components/Common/Accordion/index.tsx | 13 +-
src/components/Common/Alert/index.tsx | 3 +-
src/components/Common/Badge/index.tsx | 5 +-
.../Common/ButtonWithDropdown/index.tsx | 8 +-
src/components/Common/CachedImage/index.tsx | 2 +-
src/components/Common/ConfirmButton/index.tsx | 5 +-
src/components/Common/Header/index.tsx | 7 +-
src/components/Common/List/index.tsx | 6 +-
src/components/Common/ListView/index.tsx | 4 +-
.../Common/LoadingSpinner/index.tsx | 4 +-
src/components/Common/Modal/index.tsx | 5 +-
src/components/Common/PageTitle/index.tsx | 11 +-
src/components/Common/PlayButton/index.tsx | 2 +-
.../Common/ProgressCircle/index.tsx | 4 +-
.../Common/SensitiveInput/index.tsx | 5 +-
src/components/Common/SettingsTabs/index.tsx | 16 +-
src/components/Common/SlideOver/index.tsx | 5 +-
src/components/Common/Table/index.tsx | 25 ++-
src/components/CompanyCard/index.tsx | 2 +-
.../Discover/DiscoverMovieGenre/index.tsx | 2 +-
.../Discover/DiscoverMovieLanguage/index.tsx | 2 +-
src/components/Discover/DiscoverMovies.tsx | 2 +-
.../Discover/DiscoverNetwork/index.tsx | 2 +-
.../Discover/DiscoverStudio/index.tsx | 2 +-
src/components/Discover/DiscoverTv.tsx | 2 +-
.../Discover/DiscoverTvGenre/index.tsx | 2 +-
.../Discover/DiscoverTvLanguage/index.tsx | 2 +-
.../Discover/DiscoverTvUpcoming.tsx | 2 +-
.../Discover/MovieGenreList/index.tsx | 2 +-
.../Discover/MovieGenreSlider/index.tsx | 2 +-
.../Discover/NetworkSlider/index.tsx | 2 +-
.../Discover/StudioSlider/index.tsx | 2 +-
src/components/Discover/Trending.tsx | 2 +-
src/components/Discover/TvGenreList/index.tsx | 2 +-
.../Discover/TvGenreSlider/index.tsx | 2 +-
src/components/Discover/Upcoming.tsx | 2 +-
src/components/Discover/index.tsx | 2 +-
src/components/DownloadBlock/index.tsx | 5 +-
src/components/ExternalLinkBlock/index.tsx | 4 +-
src/components/GenreCard/index.tsx | 9 +-
src/components/IssueBlock/index.tsx | 2 +-
.../IssueDetails/IssueComment/index.tsx | 12 +-
.../IssueDetails/IssueDescription/index.tsx | 4 +-
src/components/IssueDetails/index.tsx | 2 +-
src/components/IssueList/IssueItem/index.tsx | 2 +-
src/components/IssueList/index.tsx | 8 +-
.../IssueModal/CreateIssueModal/index.tsx | 16 +-
src/components/IssueModal/index.tsx | 7 +-
src/components/JSONEditor/index.tsx | 7 +-
src/components/LanguageSelector/index.tsx | 4 +-
.../Layout/LanguagePicker/index.tsx | 2 +-
src/components/Layout/Notifications/index.tsx | 2 +-
src/components/Layout/SearchInput/index.tsx | 2 +-
src/components/Layout/Sidebar/index.tsx | 2 +-
src/components/Layout/UserDropdown/index.tsx | 2 +-
src/components/Layout/VersionStatus/index.tsx | 2 +-
src/components/Layout/index.tsx | 6 +-
src/components/Login/LocalLogin.tsx | 18 +-
src/components/Login/index.tsx | 2 +-
src/components/ManageSlideOver/index.tsx | 6 +-
.../MediaSlider/ShowMoreCard/index.tsx | 2 +-
src/components/MediaSlider/index.tsx | 4 +-
.../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 | 2 +-
.../NotificationType/index.tsx | 4 +-
.../NotificationTypeSelector/index.tsx | 4 +-
src/components/PWAHeader/index.tsx | 4 +-
src/components/PermissionEdit/index.tsx | 4 +-
src/components/PermissionOption/index.tsx | 4 +-
src/components/PersonCard/index.tsx | 4 +-
src/components/PersonDetails/index.tsx | 2 +-
src/components/PlexLoginButton/index.tsx | 4 +-
src/components/QuotaSelector/index.tsx | 4 +-
src/components/RegionSelector/index.tsx | 4 +-
src/components/RequestBlock/index.tsx | 2 +-
src/components/RequestButton/index.tsx | 4 +-
src/components/RequestCard/index.tsx | 6 +-
.../RequestList/RequestItem/index.tsx | 9 +-
src/components/RequestList/index.tsx | 8 +-
.../RequestModal/AdvancedRequester/index.tsx | 4 +-
.../RequestModal/CollectionRequestModal.tsx | 8 +-
.../RequestModal/MovieRequestModal.tsx | 16 +-
.../RequestModal/QuotaDisplay/index.tsx | 38 ++--
.../RequestModal/SearchByNameModal/index.tsx | 4 +-
.../RequestModal/TvRequestModal.tsx | 16 +-
src/components/RequestModal/index.tsx | 4 +-
.../ResetPassword/RequestResetLink.tsx | 10 +-
src/components/ResetPassword/index.tsx | 10 +-
src/components/Search/index.tsx | 2 +-
src/components/ServiceWorkerSetup/index.tsx | 3 +-
src/components/Settings/CopyButton.tsx | 2 +-
src/components/Settings/LibraryItem.tsx | 6 +-
.../Notifications/NotificationsDiscord.tsx | 48 +++--
.../Notifications/NotificationsEmail.tsx | 44 ++--
.../NotificationsGotify/index.tsx | 18 +-
.../NotificationsLunaSea/index.tsx | 38 ++--
.../NotificationsPushbullet/index.tsx | 34 ++-
.../NotificationsPushover/index.tsx | 63 +++---
.../NotificationsSlack/index.tsx | 32 +--
.../Notifications/NotificationsTelegram.tsx | 100 +++++----
.../NotificationsWebPush/index.tsx | 2 +-
.../NotificationsWebhook/index.tsx | 18 +-
src/components/Settings/RadarrModal/index.tsx | 70 ++++---
.../Settings/SettingsAbout/Releases/index.tsx | 8 +-
.../Settings/SettingsAbout/index.tsx | 8 +-
.../Settings/SettingsJobsCache/index.tsx | 2 +-
src/components/Settings/SettingsLayout.tsx | 6 +-
.../Settings/SettingsLogs/index.tsx | 14 +-
src/components/Settings/SettingsMain.tsx | 18 +-
.../Settings/SettingsNotifications.tsx | 6 +-
src/components/Settings/SettingsPlex.tsx | 100 +++++----
src/components/Settings/SettingsServices.tsx | 30 ++-
.../Settings/SettingsUsers/index.tsx | 2 +-
src/components/Settings/SonarrModal/index.tsx | 70 ++++---
src/components/Setup/LoginWithPlex.tsx | 2 +-
src/components/Setup/SetupSteps.tsx | 4 +-
src/components/Setup/index.tsx | 2 +-
src/components/Slider/index.tsx | 4 +-
src/components/StatusBadge/index.tsx | 4 +-
src/components/StatusChecker/index.tsx | 2 +-
src/components/TitleCard/Placeholder.tsx | 2 +-
src/components/TitleCard/TmdbTitleCard.tsx | 2 +-
src/components/TitleCard/index.tsx | 4 +-
src/components/Toast/index.tsx | 4 +-
src/components/ToastContainer/index.tsx | 5 +-
src/components/Transition/index.tsx | 11 +-
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 | 2 +-
src/components/UserList/BulkEditModal.tsx | 4 +-
src/components/UserList/PlexImportModal.tsx | 17 +-
src/components/UserList/index.tsx | 36 ++--
.../UserProfile/ProfileHeader/index.tsx | 5 +-
.../UserGeneralSettings/index.tsx | 38 ++--
.../UserNotificationsDiscord.tsx | 30 +--
.../UserNotificationsEmail.tsx | 10 +-
.../UserNotificationsPushbullet.tsx | 26 +--
.../UserNotificationsPushover.tsx | 55 +++--
.../UserNotificationsTelegram.tsx | 54 +++--
.../UserNotificationsWebPush.tsx | 2 +-
.../UserNotificationSettings/index.tsx | 8 +-
.../UserSettings/UserPasswordChange/index.tsx | 26 ++-
.../UserSettings/UserPermissions/index.tsx | 2 +-
.../UserProfile/UserSettings/index.tsx | 6 +-
src/components/UserProfile/index.tsx | 2 +-
src/context/InteractionContext.tsx | 5 +-
src/context/SettingsContext.tsx | 5 +-
src/context/UserContext.tsx | 6 +-
src/hooks/useIsTouch.ts | 2 +-
src/pages/404.tsx | 2 +-
src/pages/_app.tsx | 2 +
src/pages/login/plex/loading.tsx | 2 +-
src/pages/search.tsx | 2 +-
src/utils/polyfillIntl.ts | 37 ++++
yarn.lock | 196 +++++++++---------
164 files changed, 983 insertions(+), 916 deletions(-)
create mode 100644 src/utils/polyfillIntl.ts
diff --git a/next.config.js b/next.config.js
index f0a623d4..fa5f89a6 100644
--- a/next.config.js
+++ b/next.config.js
@@ -1,3 +1,6 @@
+/**
+ * @type {import('next').NextConfig}
+ */
module.exports = {
env: {
commitTag: process.env.COMMIT_TAG || 'local',
diff --git a/package.json b/package.json
index f537b239..2c7b1386 100644
--- a/package.json
+++ b/package.json
@@ -29,6 +29,9 @@
},
"license": "MIT",
"dependencies": {
+ "@formatjs/intl-displaynames": "^6.0.3",
+ "@formatjs/intl-locale": "^3.0.3",
+ "@formatjs/intl-pluralrules": "^5.0.3",
"@headlessui/react": "1.6.6",
"@heroicons/react": "1.0.6",
"@supercharge/request-ip": "1.2.0",
@@ -62,12 +65,12 @@
"openpgp": "5.4.0",
"plex-api": "5.3.2",
"pug": "3.0.2",
- "react": "17.0.2",
+ "react": "18.2.0",
"react-ace": "10.1.0",
"react-animate-height": "2.1.2",
- "react-dom": "17.0.2",
+ "react-dom": "18.2.0",
"react-intersection-observer": "9.4.0",
- "react-intl": "5.25.1",
+ "react-intl": "6.0.5",
"react-markdown": "8.0.3",
"react-select": "5.4.0",
"react-spring": "9.5.2",
@@ -111,8 +114,8 @@
"@types/node": "17.0.36",
"@types/node-schedule": "2.1.0",
"@types/nodemailer": "6.4.5",
- "@types/react": "17.0.45",
- "@types/react-dom": "17.0.17",
+ "@types/react": "18.0.17",
+ "@types/react-dom": "18.0.6",
"@types/react-transition-group": "4.4.5",
"@types/secure-random-password": "0.2.1",
"@types/semver": "7.3.12",
@@ -153,7 +156,9 @@
"typescript": "4.7.4"
},
"resolutions": {
- "sqlite3/node-gyp": "8.4.1"
+ "sqlite3/node-gyp": "8.4.1",
+ "@types/react": "18.0.17",
+ "@types/react-dom": "18.0.6"
},
"config": {
"commitizen": {
diff --git a/src/components/AppDataWarning/index.tsx b/src/components/AppDataWarning/index.tsx
index fce97bd5..1af8ea64 100644
--- a/src/components/AppDataWarning/index.tsx
+++ b/src/components/AppDataWarning/index.tsx
@@ -8,7 +8,7 @@ const messages = defineMessages({
'The {appDataPath}
volume mount was not configured properly. All data will be cleared when the container is stopped or restarted.',
});
-const AppDataWarning: React.FC = () => {
+const AppDataWarning = () => {
const intl = useIntl();
const { data, error } = useSWR<{ appData: boolean; appDataPath: string }>(
'/api/v1/status/appdata'
@@ -27,9 +27,9 @@ const AppDataWarning: React.FC = () => {
{!data.appData && (
{msg};
- },
+ code: (msg: React.ReactNode) => (
+ {msg}
+ ),
appDataPath: data.appDataPath,
})}
/>
diff --git a/src/components/CollectionDetails/index.tsx b/src/components/CollectionDetails/index.tsx
index 839f019a..d2b72bd5 100644
--- a/src/components/CollectionDetails/index.tsx
+++ b/src/components/CollectionDetails/index.tsx
@@ -31,9 +31,7 @@ interface CollectionDetailsProps {
collection?: Collection;
}
-const CollectionDetails: React.FC = ({
- collection,
-}) => {
+const CollectionDetails = ({ collection }: CollectionDetailsProps) => {
const intl = useIntl();
const router = useRouter();
const settings = useSettings();
diff --git a/src/components/Common/Accordion/index.tsx b/src/components/Common/Accordion/index.tsx
index 67e883fe..9b441527 100644
--- a/src/components/Common/Accordion/index.tsx
+++ b/src/components/Common/Accordion/index.tsx
@@ -16,19 +16,24 @@ export interface AccordionChildProps {
AccordionContent: any;
}
-export const AccordionContent: React.FC<{ isOpen: boolean }> = ({
+type AccordionContentProps = {
+ isOpen: boolean;
+ children: React.ReactNode;
+};
+
+export const AccordionContent = ({
isOpen,
children,
-}) => {
+}: AccordionContentProps) => {
return {children};
};
-const Accordion: React.FC = ({
+const Accordion = ({
single,
atLeastOne,
initialOpenIndexes,
children,
-}) => {
+}: AccordionProps) => {
const initialState = initialOpenIndexes || (atLeastOne && [0]) || [];
const [openIndexes, setOpenIndexes] = useState(initialState);
diff --git a/src/components/Common/Alert/index.tsx b/src/components/Common/Alert/index.tsx
index e9789c70..550b0b3a 100644
--- a/src/components/Common/Alert/index.tsx
+++ b/src/components/Common/Alert/index.tsx
@@ -8,9 +8,10 @@ import React from 'react';
interface AlertProps {
title?: React.ReactNode;
type?: 'warning' | 'info' | 'error';
+ children?: React.ReactNode;
}
-const Alert: React.FC = ({ title, children, type }) => {
+const Alert = ({ title, children, type }: AlertProps) => {
let design = {
bgColor: 'bg-yellow-600',
titleColor: 'text-yellow-100',
diff --git a/src/components/Common/Badge/index.tsx b/src/components/Common/Badge/index.tsx
index 33e55ab7..eae0b7df 100644
--- a/src/components/Common/Badge/index.tsx
+++ b/src/components/Common/Badge/index.tsx
@@ -5,14 +5,15 @@ interface BadgeProps {
badgeType?: 'default' | 'primary' | 'danger' | 'warning' | 'success';
className?: string;
href?: string;
+ children: React.ReactNode;
}
-const Badge: React.FC = ({
+const Badge = ({
badgeType = 'default',
className,
href,
children,
-}) => {
+}: BadgeProps) => {
const badgeStyle = [
'px-2 inline-flex text-xs leading-5 font-semibold rounded-full whitespace-nowrap',
];
diff --git a/src/components/Common/ButtonWithDropdown/index.tsx b/src/components/Common/ButtonWithDropdown/index.tsx
index d4825fb1..28a7a78f 100644
--- a/src/components/Common/ButtonWithDropdown/index.tsx
+++ b/src/components/Common/ButtonWithDropdown/index.tsx
@@ -13,11 +13,11 @@ interface DropdownItemProps extends AnchorHTMLAttributes {
buttonType?: 'primary' | 'ghost';
}
-const DropdownItem: React.FC = ({
+const DropdownItem = ({
children,
buttonType = 'primary',
...props
-}) => {
+}: DropdownItemProps) => {
let styleClass = 'button-md text-white';
switch (buttonType) {
@@ -46,14 +46,14 @@ interface ButtonWithDropdownProps
buttonType?: 'primary' | 'ghost';
}
-const ButtonWithDropdown: React.FC = ({
+const ButtonWithDropdown = ({
text,
children,
dropdownIcon,
className,
buttonType = 'primary',
...props
-}) => {
+}: ButtonWithDropdownProps) => {
const [isOpen, setIsOpen] = useState(false);
const buttonRef = useRef(null);
useClickOutside(buttonRef, () => setIsOpen(false));
diff --git a/src/components/Common/CachedImage/index.tsx b/src/components/Common/CachedImage/index.tsx
index b52b6301..3c453314 100644
--- a/src/components/Common/CachedImage/index.tsx
+++ b/src/components/Common/CachedImage/index.tsx
@@ -10,7 +10,7 @@ import useSettings from '../../../hooks/useSettings';
* It uses the `next/image` Image component but overrides
* the `unoptimized` prop based on the application setting `cacheImages`.
**/
-const CachedImage: React.FC = (props) => {
+const CachedImage = (props: ImageProps) => {
const { currentSettings } = useSettings();
return ;
diff --git a/src/components/Common/ConfirmButton/index.tsx b/src/components/Common/ConfirmButton/index.tsx
index df3c6572..95dd3925 100644
--- a/src/components/Common/ConfirmButton/index.tsx
+++ b/src/components/Common/ConfirmButton/index.tsx
@@ -6,14 +6,15 @@ interface ConfirmButtonProps {
onClick: () => void;
confirmText: React.ReactNode;
className?: string;
+ children: React.ReactNode;
}
-const ConfirmButton: React.FC = ({
+const ConfirmButton = ({
onClick,
children,
confirmText,
className,
-}) => {
+}: ConfirmButtonProps) => {
const ref = useRef(null);
useClickOutside(ref, () => setIsClicked(false));
const [isClicked, setIsClicked] = useState(false);
diff --git a/src/components/Common/Header/index.tsx b/src/components/Common/Header/index.tsx
index aa81e45e..c949d4e6 100644
--- a/src/components/Common/Header/index.tsx
+++ b/src/components/Common/Header/index.tsx
@@ -3,13 +3,10 @@ import React from 'react';
interface HeaderProps {
extraMargin?: number;
subtext?: React.ReactNode;
+ children: React.ReactNode;
}
-const Header: React.FC = ({
- children,
- extraMargin = 0,
- subtext,
-}) => {
+const Header = ({ children, extraMargin = 0, subtext }: HeaderProps) => {
return (
diff --git a/src/components/Common/List/index.tsx b/src/components/Common/List/index.tsx
index a4b91723..f98f0aa7 100644
--- a/src/components/Common/List/index.tsx
+++ b/src/components/Common/List/index.tsx
@@ -4,9 +4,10 @@ import { withProperties } from '../../../utils/typeHelpers';
interface ListItemProps {
title: string;
className?: string;
+ children: React.ReactNode;
}
-const ListItem: React.FC
= ({ title, className, children }) => {
+const ListItem = ({ title, className, children }: ListItemProps) => {
return (
@@ -22,9 +23,10 @@ const ListItem: React.FC
= ({ title, className, children }) => {
interface ListProps {
title: string;
subTitle?: string;
+ children: React.ReactNode;
}
-const List: React.FC = ({ title, subTitle, children }) => {
+const List = ({ title, subTitle, children }: ListProps) => {
return (
<>
diff --git a/src/components/Common/ListView/index.tsx b/src/components/Common/ListView/index.tsx
index d373a402..fea7ccf9 100644
--- a/src/components/Common/ListView/index.tsx
+++ b/src/components/Common/ListView/index.tsx
@@ -18,13 +18,13 @@ interface ListViewProps {
onScrollBottom: () => void;
}
-const ListView: React.FC
= ({
+const ListView = ({
items,
isEmpty,
isLoading,
onScrollBottom,
isReachingEnd,
-}) => {
+}: ListViewProps) => {
const intl = useIntl();
useVerticalScroll(onScrollBottom, !isLoading && !isEmpty && !isReachingEnd);
return (
diff --git a/src/components/Common/LoadingSpinner/index.tsx b/src/components/Common/LoadingSpinner/index.tsx
index be65f009..0a380255 100644
--- a/src/components/Common/LoadingSpinner/index.tsx
+++ b/src/components/Common/LoadingSpinner/index.tsx
@@ -1,6 +1,6 @@
import React from 'react';
-export const SmallLoadingSpinner: React.FC = () => {
+export const SmallLoadingSpinner = () => {
return (
@@ -134,19 +128,15 @@ const QuotaDisplay: React.FC = ({
{intl.formatMessage(
userOverride ? messages.quotaLinkUser : messages.quotaLink,
{
- ProfileLink: function ProfileLink(msg) {
- return (
-
-
- {msg}
-
-
- );
- },
+ ProfileLink: (msg: React.ReactNode) => (
+
+
+ {msg}
+
+
+ ),
}
)}
diff --git a/src/components/RequestModal/SearchByNameModal/index.tsx b/src/components/RequestModal/SearchByNameModal/index.tsx
index 44a60aab..cc8007eb 100644
--- a/src/components/RequestModal/SearchByNameModal/index.tsx
+++ b/src/components/RequestModal/SearchByNameModal/index.tsx
@@ -24,7 +24,7 @@ interface SearchByNameModalProps {
tmdbId: number;
}
-const SearchByNameModal: React.FC = ({
+const SearchByNameModal = ({
setTvdbId,
tvdbId,
loading,
@@ -32,7 +32,7 @@ const SearchByNameModal: React.FC = ({
closeModal,
modalTitle,
tmdbId,
-}) => {
+}: SearchByNameModalProps) => {
const intl = useIntl();
const { data, error } = useSWR(
`/api/v1/service/sonarr/lookup/${tmdbId}`
diff --git a/src/components/RequestModal/TvRequestModal.tsx b/src/components/RequestModal/TvRequestModal.tsx
index fb915e63..a081bd04 100644
--- a/src/components/RequestModal/TvRequestModal.tsx
+++ b/src/components/RequestModal/TvRequestModal.tsx
@@ -64,14 +64,14 @@ interface RequestModalProps extends React.HTMLAttributes {
editRequest?: MediaRequest;
}
-const TvRequestModal: React.FC = ({
+const TvRequestModal = ({
onCancel,
onComplete,
tmdbId,
onUpdating,
editRequest,
is4k = false,
-}) => {
+}: RequestModalProps) => {
const settings = useSettings();
const { addToast } = useToasts();
const editingSeasons: number[] = (editRequest?.seasons ?? []).map(
@@ -141,16 +141,12 @@ const TvRequestModal: React.FC = ({
: messages.requestedited,
{
title: data?.name,
- strong: function strong(msg) {
- return {msg};
- },
+ strong: (msg: React.ReactNode) => {msg},
}
)
: intl.formatMessage(messages.requestcancelled, {
title: data?.name,
- strong: function strong(msg) {
- return {msg};
- },
+ strong: (msg: React.ReactNode) => {msg},
})}
,
{
@@ -218,9 +214,7 @@ const TvRequestModal: React.FC = ({
{intl.formatMessage(messages.requestSuccess, {
title: data?.name,
- strong: function strong(msg) {
- return {msg};
- },
+ strong: (msg: React.ReactNode) => {msg},
})}
,
{ appearance: 'success', autoDismiss: true }
diff --git a/src/components/RequestModal/index.tsx b/src/components/RequestModal/index.tsx
index e6dbdb8d..4b6741cc 100644
--- a/src/components/RequestModal/index.tsx
+++ b/src/components/RequestModal/index.tsx
@@ -17,7 +17,7 @@ interface RequestModalProps {
onUpdating?: (isUpdating: boolean) => void;
}
-const RequestModal: React.FC = ({
+const RequestModal = ({
type,
show,
tmdbId,
@@ -26,7 +26,7 @@ const RequestModal: React.FC = ({
onComplete,
onUpdating,
onCancel,
-}) => {
+}: RequestModalProps) => {
return (
{
+const ResetPassword = () => {
const intl = useIntl();
const [hasSubmitted, setSubmitted] = useState(false);
@@ -113,9 +113,11 @@ const ResetPassword: React.FC = () => {
className="form-input-area block w-full min-w-0 flex-1 rounded-md border border-gray-500 bg-gray-700 text-white transition duration-150 ease-in-out sm:text-sm sm:leading-5"
/>
- {errors.email && touched.email && (
-
{errors.email}
- )}
+ {errors.email &&
+ touched.email &&
+ typeof errors.email === 'string' && (
+
{errors.email}
+ )}
diff --git a/src/components/ResetPassword/index.tsx b/src/components/ResetPassword/index.tsx
index a7077b54..ad2a3e44 100644
--- a/src/components/ResetPassword/index.tsx
+++ b/src/components/ResetPassword/index.tsx
@@ -25,7 +25,7 @@ const messages = defineMessages({
resetpasswordsuccessmessage: 'Password reset successfully!',
});
-const ResetPassword: React.FC = () => {
+const ResetPassword = () => {
const intl = useIntl();
const router = useRouter();
const [hasSubmitted, setSubmitted] = useState(false);
@@ -129,9 +129,11 @@ const ResetPassword: React.FC = () => {
className="form-input-area block w-full min-w-0 flex-1 rounded-md border border-gray-500 bg-gray-700 text-white transition duration-150 ease-in-out sm:text-sm sm:leading-5"
/>
- {errors.password && touched.password && (
-
{errors.password}
- )}
+ {errors.password &&
+ touched.password &&
+ typeof errors.password === 'string' && (
+
{errors.password}
+ )}
@@ -179,9 +177,11 @@ const NotificationsLunaSea: React.FC = () => {
inputMode="url"
/>
- {errors.webhookUrl && touched.webhookUrl && (
- {errors.webhookUrl}
- )}
+ {errors.webhookUrl &&
+ touched.webhookUrl &&
+ typeof errors.webhookUrl === 'string' && (
+ {errors.webhookUrl}
+ )}
@@ -189,9 +189,9 @@ const NotificationsLunaSea: React.FC = () => {
{intl.formatMessage(messages.profileName)}
{intl.formatMessage(messages.profileNameTip, {
- code: function code(msg) {
- return {msg}
;
- },
+ code: (msg: React.ReactNode) => (
+ {msg}
+ ),
})}
diff --git a/src/components/Settings/Notifications/NotificationsPushbullet/index.tsx b/src/components/Settings/Notifications/NotificationsPushbullet/index.tsx
index 1aa631c9..c6ec8432 100644
--- a/src/components/Settings/Notifications/NotificationsPushbullet/index.tsx
+++ b/src/components/Settings/Notifications/NotificationsPushbullet/index.tsx
@@ -28,7 +28,7 @@ const messages = defineMessages({
validationTypes: 'You must select at least one notification type',
});
-const NotificationsPushbullet: React.FC = () => {
+const NotificationsPushbullet = () => {
const intl = useIntl();
const { addToast, removeToast } = useToasts();
const [isTesting, setIsTesting] = useState(false);
@@ -154,20 +154,16 @@ const NotificationsPushbullet: React.FC = () => {
*
{intl.formatMessage(messages.accessTokenTip, {
- PushbulletSettingsLink: function PushbulletSettingsLink(
- msg
- ) {
- return (
-
- {msg}
-
- );
- },
+ PushbulletSettingsLink: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
})}
@@ -180,9 +176,11 @@ const NotificationsPushbullet: React.FC = () => {
autoComplete="one-time-code"
/>
- {errors.accessToken && touched.accessToken && (
- {errors.accessToken}
- )}
+ {errors.accessToken &&
+ touched.accessToken &&
+ typeof errors.accessToken === 'string' && (
+ {errors.accessToken}
+ )}
diff --git a/src/components/Settings/Notifications/NotificationsPushover/index.tsx b/src/components/Settings/Notifications/NotificationsPushover/index.tsx
index 44229f57..9f78a678 100644
--- a/src/components/Settings/Notifications/NotificationsPushover/index.tsx
+++ b/src/components/Settings/Notifications/NotificationsPushover/index.tsx
@@ -29,7 +29,7 @@ const messages = defineMessages({
validationTypes: 'You must select at least one notification type',
});
-const NotificationsPushover: React.FC = () => {
+const NotificationsPushover = () => {
const intl = useIntl();
const { addToast, removeToast } = useToasts();
const [isTesting, setIsTesting] = useState(false);
@@ -172,19 +172,16 @@ const NotificationsPushover: React.FC = () => {
*
{intl.formatMessage(messages.accessTokenTip, {
- ApplicationRegistrationLink:
- function ApplicationRegistrationLink(msg) {
- return (
-
- {msg}
-
- );
- },
+ ApplicationRegistrationLink: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
})}
@@ -192,9 +189,11 @@ const NotificationsPushover: React.FC = () => {
- {errors.accessToken && touched.accessToken && (
-
{errors.accessToken}
- )}
+ {errors.accessToken &&
+ touched.accessToken &&
+ typeof errors.accessToken === 'string' && (
+
{errors.accessToken}
+ )}
@@ -203,18 +202,16 @@ const NotificationsPushover: React.FC = () => {
*
{intl.formatMessage(messages.userTokenTip, {
- UsersGroupsLink: function UsersGroupsLink(msg) {
- return (
-
- {msg}
-
- );
- },
+ UsersGroupsLink: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
})}
@@ -222,9 +219,11 @@ const NotificationsPushover: React.FC = () => {
- {errors.userToken && touched.userToken && (
-
{errors.userToken}
- )}
+ {errors.userToken &&
+ touched.userToken &&
+ typeof errors.userToken === 'string' && (
+
{errors.userToken}
+ )}
{
+const NotificationsSlack = () => {
const intl = useIntl();
const { addToast, removeToast } = useToasts();
const [isTesting, setIsTesting] = useState(false);
@@ -150,18 +150,16 @@ const NotificationsSlack: React.FC = () => {
*
{intl.formatMessage(messages.webhookUrlTip, {
- WebhookLink: function WebhookLink(msg) {
- return (
-
- {msg}
-
- );
- },
+ WebhookLink: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
})}
@@ -174,9 +172,11 @@ const NotificationsSlack: React.FC = () => {
inputMode="url"
/>
- {errors.webhookUrl && touched.webhookUrl && (
- {errors.webhookUrl}
- )}
+ {errors.webhookUrl &&
+ touched.webhookUrl &&
+ typeof errors.webhookUrl === 'string' && (
+ {errors.webhookUrl}
+ )}
{
+const NotificationsTelegram = () => {
const intl = useIntl();
const { addToast, removeToast } = useToasts();
const [isTesting, setIsTesting] = useState(false);
@@ -179,33 +179,29 @@ const NotificationsTelegram: React.FC = () => {
*
{intl.formatMessage(messages.botApiTip, {
- CreateBotLink: function CreateBotLink(msg) {
- return (
-
- {msg}
-
- );
- },
- GetIdBotLink: function GetIdBotLink(msg) {
- return (
-
- {msg}
-
- );
- },
- code: function code(msg) {
- return {msg}
;
- },
+ CreateBotLink: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
+ GetIdBotLink: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
+ code: (msg: React.ReactNode) => (
+ {msg}
+ ),
})}
@@ -218,9 +214,11 @@ const NotificationsTelegram: React.FC = () => {
autoComplete="one-time-code"
/>
- {errors.botAPI && touched.botAPI && (
- {errors.botAPI}
- )}
+ {errors.botAPI &&
+ touched.botAPI &&
+ typeof errors.botAPI === 'string' && (
+ {errors.botAPI}
+ )}
@@ -234,9 +232,11 @@ const NotificationsTelegram: React.FC = () => {
- {errors.botUsername && touched.botUsername && (
-
{errors.botUsername}
- )}
+ {errors.botUsername &&
+ touched.botUsername &&
+ typeof errors.botUsername === 'string' && (
+
{errors.botUsername}
+ )}
@@ -245,20 +245,16 @@ const NotificationsTelegram: React.FC = () => {
*
{intl.formatMessage(messages.chatIdTip, {
- GetIdBotLink: function GetIdBotLink(msg) {
- return (
-
- {msg}
-
- );
- },
- code: function code(msg) {
- return {msg}
;
- },
+ GetIdBotLink: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
+ code: (msg: React.ReactNode) => {msg}
,
})}
@@ -266,9 +262,11 @@ const NotificationsTelegram: React.FC = () => {
- {errors.chatId && touched.chatId && (
-
{errors.chatId}
- )}
+ {errors.chatId &&
+ touched.chatId &&
+ typeof errors.chatId === 'string' && (
+
{errors.chatId}
+ )}
diff --git a/src/components/Settings/Notifications/NotificationsWebPush/index.tsx b/src/components/Settings/Notifications/NotificationsWebPush/index.tsx
index 8d4a6c0b..55bfb949 100644
--- a/src/components/Settings/Notifications/NotificationsWebPush/index.tsx
+++ b/src/components/Settings/Notifications/NotificationsWebPush/index.tsx
@@ -21,7 +21,7 @@ const messages = defineMessages({
'In order to receive web push notifications, Overseerr must be served over HTTPS.',
});
-const NotificationsWebPush: React.FC = () => {
+const NotificationsWebPush = () => {
const intl = useIntl();
const { addToast, removeToast } = useToasts();
const [isTesting, setIsTesting] = useState(false);
diff --git a/src/components/Settings/Notifications/NotificationsWebhook/index.tsx b/src/components/Settings/Notifications/NotificationsWebhook/index.tsx
index d47bd1b2..8c0ef1dc 100644
--- a/src/components/Settings/Notifications/NotificationsWebhook/index.tsx
+++ b/src/components/Settings/Notifications/NotificationsWebhook/index.tsx
@@ -70,7 +70,7 @@ const messages = defineMessages({
validationTypes: 'You must select at least one notification type',
});
-const NotificationsWebhook: React.FC = () => {
+const NotificationsWebhook = () => {
const intl = useIntl();
const { addToast, removeToast } = useToasts();
const [isTesting, setIsTesting] = useState(false);
@@ -244,9 +244,11 @@ const NotificationsWebhook: React.FC = () => {
inputMode="url"
/>
- {errors.webhookUrl && touched.webhookUrl && (
- {errors.webhookUrl}
- )}
+ {errors.webhookUrl &&
+ touched.webhookUrl &&
+ typeof errors.webhookUrl === 'string' && (
+ {errors.webhookUrl}
+ )}
@@ -273,9 +275,11 @@ const NotificationsWebhook: React.FC = () => {
onBlur={() => setFieldTouched('jsonPayload')}
/>
- {errors.jsonPayload && touched.jsonPayload && (
- {errors.jsonPayload}
- )}
+ {errors.jsonPayload &&
+ touched.jsonPayload &&
+ typeof errors.jsonPayload === 'string' && (
+ {errors.jsonPayload}
+ )}
- {errors.name && touched.name && (
- {errors.name}
- )}
+ {errors.name &&
+ touched.name &&
+ typeof errors.name === 'string' && (
+ {errors.name}
+ )}
@@ -410,9 +408,11 @@ const RadarrModal: React.FC = ({
className="rounded-r-only"
/>
- {errors.hostname && touched.hostname && (
- {errors.hostname}
- )}
+ {errors.hostname &&
+ touched.hostname &&
+ typeof errors.hostname === 'string' && (
+ {errors.hostname}
+ )}
@@ -432,9 +432,11 @@ const RadarrModal: React.FC
= ({
setFieldValue('port', e.target.value);
}}
/>
- {errors.port && touched.port && (
- {errors.port}
- )}
+ {errors.port &&
+ touched.port &&
+ typeof errors.port === 'string' && (
+ {errors.port}
+ )}
@@ -471,9 +473,11 @@ const RadarrModal: React.FC = ({
}}
/>
- {errors.apiKey && touched.apiKey && (
- {errors.apiKey}
- )}
+ {errors.apiKey &&
+ touched.apiKey &&
+ typeof errors.apiKey === 'string' && (
+ {errors.apiKey}
+ )}
@@ -493,9 +497,11 @@ const RadarrModal: React.FC = ({
}}
/>
- {errors.baseUrl && touched.baseUrl && (
- {errors.baseUrl}
- )}
+ {errors.baseUrl &&
+ touched.baseUrl &&
+ typeof errors.baseUrl === 'string' && (
+ {errors.baseUrl}
+ )}
@@ -531,9 +537,11 @@ const RadarrModal: React.FC = ({
))}
- {errors.activeProfileId && touched.activeProfileId && (
- {errors.activeProfileId}
- )}
+ {errors.activeProfileId &&
+ touched.activeProfileId &&
+ typeof errors.activeProfileId === 'string' && (
+ {errors.activeProfileId}
+ )}
@@ -567,9 +575,11 @@ const RadarrModal: React.FC = ({
))}
- {errors.rootFolder && touched.rootFolder && (
- {errors.rootFolder}
- )}
+ {errors.rootFolder &&
+ touched.rootFolder &&
+ typeof errors.rootFolder === 'string' && (
+ {errors.rootFolder}
+ )}
@@ -673,9 +683,11 @@ const RadarrModal: React.FC = ({
inputMode="url"
/>
- {errors.externalUrl && touched.externalUrl && (
- {errors.externalUrl}
- )}
+ {errors.externalUrl &&
+ touched.externalUrl &&
+ typeof errors.externalUrl === 'string' && (
+ {errors.externalUrl}
+ )}
diff --git a/src/components/Settings/SettingsAbout/Releases/index.tsx b/src/components/Settings/SettingsAbout/Releases/index.tsx
index 81db42e5..cfe92882 100644
--- a/src/components/Settings/SettingsAbout/Releases/index.tsx
+++ b/src/components/Settings/SettingsAbout/Releases/index.tsx
@@ -48,11 +48,7 @@ interface ReleaseProps {
currentVersion: string;
}
-const Release: React.FC
= ({
- currentVersion,
- release,
- isLatest,
-}) => {
+const Release = ({ currentVersion, release, isLatest }: ReleaseProps) => {
const intl = useIntl();
const [isModalOpen, setModalOpen] = useState(false);
@@ -120,7 +116,7 @@ interface ReleasesProps {
currentVersion: string;
}
-const Releases: React.FC = ({ currentVersion }) => {
+const Releases = ({ currentVersion }: ReleasesProps) => {
const intl = useIntl();
const { data, error } = useSWR(REPO_RELEASE_API);
diff --git a/src/components/Settings/SettingsAbout/index.tsx b/src/components/Settings/SettingsAbout/index.tsx
index 7dfa75d0..c484a5f0 100644
--- a/src/components/Settings/SettingsAbout/index.tsx
+++ b/src/components/Settings/SettingsAbout/index.tsx
@@ -37,7 +37,7 @@ const messages = defineMessages({
'You are running the develop
branch of Overseerr, which is only recommended for those contributing to development or assisting with bleeding-edge testing.',
});
-const SettingsAbout: React.FC = () => {
+const SettingsAbout = () => {
const intl = useIntl();
const { data, error } = useSWR(
'/api/v1/settings/about'
@@ -88,9 +88,9 @@ const SettingsAbout: React.FC = () => {
{data.version.startsWith('develop-') && (
{msg};
- },
+ code: (msg: React.ReactNode) => (
+ {msg}
+ ),
})}
/>
)}
diff --git a/src/components/Settings/SettingsJobsCache/index.tsx b/src/components/Settings/SettingsJobsCache/index.tsx
index 38403a16..eaaf5793 100644
--- a/src/components/Settings/SettingsJobsCache/index.tsx
+++ b/src/components/Settings/SettingsJobsCache/index.tsx
@@ -70,7 +70,7 @@ interface Job {
running: boolean;
}
-const SettingsJobs: React.FC = () => {
+const SettingsJobs = () => {
const intl = useIntl();
const { addToast } = useToasts();
const {
diff --git a/src/components/Settings/SettingsLayout.tsx b/src/components/Settings/SettingsLayout.tsx
index 4a366cbc..f5bdb6f3 100644
--- a/src/components/Settings/SettingsLayout.tsx
+++ b/src/components/Settings/SettingsLayout.tsx
@@ -16,7 +16,11 @@ const messages = defineMessages({
menuAbout: 'About',
});
-const SettingsLayout: React.FC = ({ children }) => {
+type SettingsLayoutProps = {
+ children: React.ReactNode;
+};
+
+const SettingsLayout = ({ children }: SettingsLayoutProps) => {
const intl = useIntl();
const settingsRoutes: SettingsRoute[] = [
diff --git a/src/components/Settings/SettingsLogs/index.tsx b/src/components/Settings/SettingsLogs/index.tsx
index a42bb820..41294177 100644
--- a/src/components/Settings/SettingsLogs/index.tsx
+++ b/src/components/Settings/SettingsLogs/index.tsx
@@ -51,7 +51,7 @@ const messages = defineMessages({
type Filter = 'debug' | 'info' | 'warn' | 'error';
-const SettingsLogs: React.FC = () => {
+const SettingsLogs = () => {
const router = useRouter();
const intl = useIntl();
const { addToast } = useToasts();
@@ -232,9 +232,9 @@ const SettingsLogs: React.FC = () => {
{intl.formatMessage(messages.logs)}
{intl.formatMessage(messages.logsDescription, {
- code: function code(msg) {
- return {msg}
;
- },
+ code: (msg: React.ReactNode) => (
+ {msg}
+ ),
appDataPath: appData ? appData.appDataPath : '/app/config',
})}
@@ -388,9 +388,9 @@ const SettingsLogs: React.FC = () => {
data.results.length
: (pageIndex + 1) * currentPageSize,
total: data.pageInfo.results,
- strong: function strong(msg) {
- return {msg};
- },
+ strong: (msg: React.ReactNode) => (
+ {msg}
+ ),
})}
diff --git a/src/components/Settings/SettingsMain.tsx b/src/components/Settings/SettingsMain.tsx
index bc2397b7..c4dd34b4 100644
--- a/src/components/Settings/SettingsMain.tsx
+++ b/src/components/Settings/SettingsMain.tsx
@@ -57,7 +57,7 @@ const messages = defineMessages({
locale: 'Display Language',
});
-const SettingsMain: React.FC = () => {
+const SettingsMain = () => {
const { addToast } = useToasts();
const { user: currentUser, hasPermission: userHasPermission } = useUser();
const intl = useIntl();
@@ -227,9 +227,11 @@ const SettingsMain: React.FC = () => {
type="text"
/>
- {errors.applicationTitle && touched.applicationTitle && (
- {errors.applicationTitle}
- )}
+ {errors.applicationTitle &&
+ touched.applicationTitle &&
+ typeof errors.applicationTitle === 'string' && (
+ {errors.applicationTitle}
+ )}
@@ -245,9 +247,11 @@ const SettingsMain: React.FC = () => {
inputMode="url"
/>
- {errors.applicationUrl && touched.applicationUrl && (
- {errors.applicationUrl}
- )}
+ {errors.applicationUrl &&
+ touched.applicationUrl &&
+ typeof errors.applicationUrl === 'string' && (
+ {errors.applicationUrl}
+ )}
diff --git a/src/components/Settings/SettingsNotifications.tsx b/src/components/Settings/SettingsNotifications.tsx
index e275e0a4..c8a7a522 100644
--- a/src/components/Settings/SettingsNotifications.tsx
+++ b/src/components/Settings/SettingsNotifications.tsx
@@ -23,7 +23,11 @@ const messages = defineMessages({
webpush: 'Web Push',
});
-const SettingsNotifications: React.FC = ({ children }) => {
+type SettingsNotificationsProps = {
+ children: React.ReactNode;
+};
+
+const SettingsNotifications = ({ children }: SettingsNotificationsProps) => {
const intl = useIntl();
const settingsRoutes: SettingsRoute[] = [
diff --git a/src/components/Settings/SettingsPlex.tsx b/src/components/Settings/SettingsPlex.tsx
index d5aa7749..4a57aac9 100644
--- a/src/components/Settings/SettingsPlex.tsx
+++ b/src/components/Settings/SettingsPlex.tsx
@@ -107,7 +107,7 @@ interface SettingsPlexProps {
onComplete?: () => void;
}
-const SettingsPlex: React.FC
= ({ onComplete }) => {
+const SettingsPlex = ({ onComplete }: SettingsPlexProps) => {
const [isSyncing, setIsSyncing] = useState(false);
const [isRefreshingPresets, setIsRefreshingPresets] = useState(false);
const [availableServers, setAvailableServers] = useState(
@@ -344,18 +344,16 @@ const SettingsPlex: React.FC = ({ onComplete }) => {
- {msg}
-
- );
- },
+ RegisterPlexTVLink: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
})}
type="info"
/>
@@ -517,9 +515,11 @@ const SettingsPlex: React.FC = ({ onComplete }) => {
className="rounded-r-only"
/>
- {errors.hostname && touched.hostname && (
- {errors.hostname}
- )}
+ {errors.hostname &&
+ touched.hostname &&
+ typeof errors.hostname === 'string' && (
+ {errors.hostname}
+ )}
@@ -535,9 +535,11 @@ const SettingsPlex: React.FC
= ({ onComplete }) => {
name="port"
className="short"
/>
- {errors.port && touched.port && (
- {errors.port}
- )}
+ {errors.port &&
+ touched.port &&
+ typeof errors.port === 'string' && (
+ {errors.port}
+ )}
@@ -558,17 +560,15 @@ const SettingsPlex: React.FC
= ({ onComplete }) => {
- {errors.webAppUrl && touched.webAppUrl && (
- {errors.webAppUrl}
- )}
+ {errors.webAppUrl &&
+ touched.webAppUrl &&
+ typeof errors.webAppUrl === 'string' && (
+ {errors.webAppUrl}
+ )}
@@ -803,9 +805,11 @@ const SettingsPlex: React.FC = ({ onComplete }) => {
className="rounded-r-only"
/>
- {errors.tautulliHostname && touched.tautulliHostname && (
- {errors.tautulliHostname}
- )}
+ {errors.tautulliHostname &&
+ touched.tautulliHostname &&
+ typeof errors.tautulliHostname === 'string' && (
+ {errors.tautulliHostname}
+ )}
@@ -821,9 +825,11 @@ const SettingsPlex: React.FC
= ({ onComplete }) => {
name="tautulliPort"
className="short"
/>
- {errors.tautulliPort && touched.tautulliPort && (
- {errors.tautulliPort}
- )}
+ {errors.tautulliPort &&
+ touched.tautulliPort &&
+ typeof errors.tautulliPort === 'string' && (
+ {errors.tautulliPort}
+ )}
@@ -857,9 +863,11 @@ const SettingsPlex: React.FC = ({ onComplete }) => {
name="tautulliUrlBase"
/>
- {errors.tautulliUrlBase && touched.tautulliUrlBase && (
- {errors.tautulliUrlBase}
- )}
+ {errors.tautulliUrlBase &&
+ touched.tautulliUrlBase &&
+ typeof errors.tautulliUrlBase === 'string' && (
+ {errors.tautulliUrlBase}
+ )}
@@ -876,9 +884,11 @@ const SettingsPlex: React.FC = ({ onComplete }) => {
autoComplete="one-time-code"
/>
- {errors.tautulliApiKey && touched.tautulliApiKey && (
- {errors.tautulliApiKey}
- )}
+ {errors.tautulliApiKey &&
+ touched.tautulliApiKey &&
+ typeof errors.tautulliApiKey === 'string' && (
+ {errors.tautulliApiKey}
+ )}
diff --git a/src/components/Settings/SettingsServices.tsx b/src/components/Settings/SettingsServices.tsx
index 36272f1b..8d6398db 100644
--- a/src/components/Settings/SettingsServices.tsx
+++ b/src/components/Settings/SettingsServices.tsx
@@ -60,7 +60,7 @@ interface ServerInstanceProps {
onDelete: () => void;
}
-const ServerInstance: React.FC
= ({
+const ServerInstance = ({
name,
hostname,
port,
@@ -72,7 +72,7 @@ const ServerInstance: React.FC = ({
externalUrl,
onEdit,
onDelete,
-}) => {
+}: ServerInstanceProps) => {
const intl = useIntl();
const internalUrl =
@@ -161,7 +161,7 @@ const ServerInstance: React.FC = ({
);
};
-const SettingsServices: React.FC = () => {
+const SettingsServices = () => {
const intl = useIntl();
const {
data: radarrData,
@@ -294,13 +294,11 @@ const SettingsServices: React.FC = () => {
- {msg}
-
- );
- },
+ strong: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
})}
/>
) : (
@@ -384,13 +382,11 @@ const SettingsServices: React.FC = () => {
- {msg}
-
- );
- },
+ strong: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
})}
/>
) : (
diff --git a/src/components/Settings/SettingsUsers/index.tsx b/src/components/Settings/SettingsUsers/index.tsx
index 8e1d9350..f6afd4cb 100644
--- a/src/components/Settings/SettingsUsers/index.tsx
+++ b/src/components/Settings/SettingsUsers/index.tsx
@@ -30,7 +30,7 @@ const messages = defineMessages({
defaultPermissionsTip: 'Initial permissions assigned to new users',
});
-const SettingsUsers: React.FC = () => {
+const SettingsUsers = () => {
const { addToast } = useToasts();
const intl = useIntl();
const {
diff --git a/src/components/Settings/SonarrModal/index.tsx b/src/components/Settings/SonarrModal/index.tsx
index 3e9e239f..d4237801 100644
--- a/src/components/Settings/SonarrModal/index.tsx
+++ b/src/components/Settings/SonarrModal/index.tsx
@@ -99,11 +99,7 @@ interface SonarrModalProps {
onSave: () => void;
}
-const SonarrModal: React.FC = ({
- onClose,
- sonarr,
- onSave,
-}) => {
+const SonarrModal = ({ onClose, sonarr, onSave }: SonarrModalProps) => {
const intl = useIntl();
const initialLoad = useRef(false);
const { addToast } = useToasts();
@@ -412,9 +408,11 @@ const SonarrModal: React.FC = ({
}}
/>
- {errors.name && touched.name && (
- {errors.name}
- )}
+ {errors.name &&
+ touched.name &&
+ typeof errors.name === 'string' && (
+ {errors.name}
+ )}
@@ -439,9 +437,11 @@ const SonarrModal: React.FC = ({
className="rounded-r-only"
/>
- {errors.hostname && touched.hostname && (
- {errors.hostname}
- )}
+ {errors.hostname &&
+ touched.hostname &&
+ typeof errors.hostname === 'string' && (
+ {errors.hostname}
+ )}
@@ -461,9 +461,11 @@ const SonarrModal: React.FC
= ({
setFieldValue('port', e.target.value);
}}
/>
- {errors.port && touched.port && (
- {errors.port}
- )}
+ {errors.port &&
+ touched.port &&
+ typeof errors.port === 'string' && (
+ {errors.port}
+ )}
@@ -500,9 +502,11 @@ const SonarrModal: React.FC = ({
}}
/>
- {errors.apiKey && touched.apiKey && (
- {errors.apiKey}
- )}
+ {errors.apiKey &&
+ touched.apiKey &&
+ typeof errors.apiKey === 'string' && (
+ {errors.apiKey}
+ )}
@@ -522,9 +526,11 @@ const SonarrModal: React.FC = ({
}}
/>
- {errors.baseUrl && touched.baseUrl && (
- {errors.baseUrl}
- )}
+ {errors.baseUrl &&
+ touched.baseUrl &&
+ typeof errors.baseUrl === 'string' && (
+ {errors.baseUrl}
+ )}
@@ -560,9 +566,11 @@ const SonarrModal: React.FC = ({
))}
- {errors.activeProfileId && touched.activeProfileId && (
- {errors.activeProfileId}
- )}
+ {errors.activeProfileId &&
+ touched.activeProfileId &&
+ typeof errors.activeProfileId === 'string' && (
+ {errors.activeProfileId}
+ )}
@@ -596,9 +604,11 @@ const SonarrModal: React.FC = ({
))}
- {errors.rootFolder && touched.rootFolder && (
- {errors.rootFolder}
- )}
+ {errors.rootFolder &&
+ touched.rootFolder &&
+ typeof errors.rootFolder === 'string' && (
+ {errors.rootFolder}
+ )}
@@ -920,9 +930,11 @@ const SonarrModal: React.FC = ({
inputMode="url"
/>
- {errors.externalUrl && touched.externalUrl && (
- {errors.externalUrl}
- )}
+ {errors.externalUrl &&
+ touched.externalUrl &&
+ typeof errors.externalUrl === 'string' && (
+ {errors.externalUrl}
+ )}
diff --git a/src/components/Setup/LoginWithPlex.tsx b/src/components/Setup/LoginWithPlex.tsx
index 90d4425b..b5341ad4 100644
--- a/src/components/Setup/LoginWithPlex.tsx
+++ b/src/components/Setup/LoginWithPlex.tsx
@@ -13,7 +13,7 @@ interface LoginWithPlexProps {
onComplete: () => void;
}
-const LoginWithPlex: React.FC
= ({ onComplete }) => {
+const LoginWithPlex = ({ onComplete }: LoginWithPlexProps) => {
const intl = useIntl();
const [authToken, setAuthToken] = useState(undefined);
const { user, revalidate } = useUser();
diff --git a/src/components/Setup/SetupSteps.tsx b/src/components/Setup/SetupSteps.tsx
index cee5263d..0fa87c92 100644
--- a/src/components/Setup/SetupSteps.tsx
+++ b/src/components/Setup/SetupSteps.tsx
@@ -9,13 +9,13 @@ interface CurrentStep {
isLastStep?: boolean;
}
-const SetupSteps: React.FC = ({
+const SetupSteps = ({
stepNumber,
description,
active = false,
completed = false,
isLastStep = false,
-}) => {
+}: CurrentStep) => {
return (
diff --git a/src/components/Setup/index.tsx b/src/components/Setup/index.tsx
index a1916290..88e4bb3c 100644
--- a/src/components/Setup/index.tsx
+++ b/src/components/Setup/index.tsx
@@ -28,7 +28,7 @@ const messages = defineMessages({
'Scanning will run in the background. You can continue the setup process in the meantime.',
});
-const Setup: React.FC = () => {
+const Setup = () => {
const intl = useIntl();
const [isUpdating, setIsUpdating] = useState(false);
const [currentStep, setCurrentStep] = useState(1);
diff --git a/src/components/Slider/index.tsx b/src/components/Slider/index.tsx
index 45d43f7a..b958567f 100644
--- a/src/components/Slider/index.tsx
+++ b/src/components/Slider/index.tsx
@@ -21,14 +21,14 @@ enum Direction {
LEFT,
}
-const Slider: React.FC
= ({
+const Slider = ({
sliderKey,
items,
isLoading,
isEmpty,
emptyMessage,
placeholder = ,
-}) => {
+}: SliderProps) => {
const intl = useIntl();
const containerRef = useRef(null);
const [scrollPos, setScrollPos] = useState({ isStart: true, isEnd: false });
diff --git a/src/components/StatusBadge/index.tsx b/src/components/StatusBadge/index.tsx
index 196b3a5d..e891328b 100644
--- a/src/components/StatusBadge/index.tsx
+++ b/src/components/StatusBadge/index.tsx
@@ -22,7 +22,7 @@ interface StatusBadgeProps {
mediaType?: 'movie' | 'tv';
}
-const StatusBadge: React.FC = ({
+const StatusBadge = ({
status,
is4k = false,
inProgress = false,
@@ -30,7 +30,7 @@ const StatusBadge: React.FC = ({
serviceUrl,
tmdbId,
mediaType,
-}) => {
+}: StatusBadgeProps) => {
const intl = useIntl();
const { hasPermission } = useUser();
const settings = useSettings();
diff --git a/src/components/StatusChecker/index.tsx b/src/components/StatusChecker/index.tsx
index dd1fef3d..0204b8ea 100644
--- a/src/components/StatusChecker/index.tsx
+++ b/src/components/StatusChecker/index.tsx
@@ -19,7 +19,7 @@ const messages = defineMessages({
'Please restart the server to apply the updated settings.',
});
-const StatusChecker: React.FC = () => {
+const StatusChecker = () => {
const intl = useIntl();
const settings = useSettings();
const { hasPermission } = useUser();
diff --git a/src/components/TitleCard/Placeholder.tsx b/src/components/TitleCard/Placeholder.tsx
index 14148ddf..268dd8e6 100644
--- a/src/components/TitleCard/Placeholder.tsx
+++ b/src/components/TitleCard/Placeholder.tsx
@@ -4,7 +4,7 @@ interface PlaceholderProps {
canExpand?: boolean;
}
-const Placeholder: React.FC = ({ canExpand = false }) => {
+const Placeholder = ({ canExpand = false }: PlaceholderProps) => {
return (
{
return (movie as MovieDetails).title !== undefined;
};
-const TmdbTitleCard: React.FC
= ({ tmdbId, type }) => {
+const TmdbTitleCard = ({ tmdbId, type }: TmdbTitleCardProps) => {
const { ref, inView } = useInView({
triggerOnce: true,
});
diff --git a/src/components/TitleCard/index.tsx b/src/components/TitleCard/index.tsx
index 43374571..816a183e 100644
--- a/src/components/TitleCard/index.tsx
+++ b/src/components/TitleCard/index.tsx
@@ -29,7 +29,7 @@ interface TitleCardProps {
inProgress?: boolean;
}
-const TitleCard: React.FC = ({
+const TitleCard = ({
id,
image,
summary,
@@ -39,7 +39,7 @@ const TitleCard: React.FC = ({
mediaType,
inProgress = false,
canExpand = false,
-}) => {
+}: TitleCardProps) => {
const isTouch = useIsTouch();
const intl = useIntl();
const { hasPermission } = useUser();
diff --git a/src/components/Toast/index.tsx b/src/components/Toast/index.tsx
index 39d8e68b..0d35aec0 100644
--- a/src/components/Toast/index.tsx
+++ b/src/components/Toast/index.tsx
@@ -9,12 +9,12 @@ import React from 'react';
import type { ToastProps } from 'react-toast-notifications';
import Transition from '../Transition';
-const Toast: React.FC = ({
+const Toast = ({
appearance,
children,
onDismiss,
transitionState,
-}) => {
+}: ToastProps) => {
return (
= ({
- hasToasts,
- ...props
-}) => {
+const ToastContainer = ({ hasToasts, ...props }: ToastContainerProps) => {
return (
= ({
+const CSSTransition = ({
show,
enter = '',
enterFrom = '',
@@ -37,7 +38,7 @@ const CSSTransition: React.FC
= ({
leaveTo = '',
appear,
children,
-}) => {
+}: CSSTransitionProps) => {
const enterClasses = enter.split(' ').filter((s) => s.length);
const enterFromClasses = enterFrom.split(' ').filter((s) => s.length);
const enterToClasses = enterTo.split(' ').filter((s) => s.length);
@@ -87,11 +88,7 @@ const CSSTransition: React.FC = ({
);
};
-const Transition: React.FC = ({
- show,
- appear,
- ...rest
-}) => {
+const Transition = ({ show, appear, ...rest }: CSSTransitionProps) => {
const { parent } = useContext(TransitionContext);
const isInitialRender = useIsInitialRender();
const isChild = show === undefined;
diff --git a/src/components/TvDetails/TvCast/index.tsx b/src/components/TvDetails/TvCast/index.tsx
index 9631ad49..cf7d60c4 100644
--- a/src/components/TvDetails/TvCast/index.tsx
+++ b/src/components/TvDetails/TvCast/index.tsx
@@ -14,7 +14,7 @@ const messages = defineMessages({
fullseriescast: 'Full Series Cast',
});
-const TvCast: React.FC = () => {
+const TvCast = () => {
const router = useRouter();
const intl = useIntl();
const { data, error } = useSWR(`/api/v1/tv/${router.query.tvId}`);
diff --git a/src/components/TvDetails/TvCrew/index.tsx b/src/components/TvDetails/TvCrew/index.tsx
index 5ed0297d..621479e3 100644
--- a/src/components/TvDetails/TvCrew/index.tsx
+++ b/src/components/TvDetails/TvCrew/index.tsx
@@ -14,7 +14,7 @@ const messages = defineMessages({
fullseriescrew: 'Full Series Crew',
});
-const TvCrew: React.FC = () => {
+const TvCrew = () => {
const router = useRouter();
const intl = useIntl();
const { data, error } = useSWR(`/api/v1/tv/${router.query.tvId}`);
diff --git a/src/components/TvDetails/TvRecommendations.tsx b/src/components/TvDetails/TvRecommendations.tsx
index 5e473e40..4f5832d5 100644
--- a/src/components/TvDetails/TvRecommendations.tsx
+++ b/src/components/TvDetails/TvRecommendations.tsx
@@ -15,7 +15,7 @@ const messages = defineMessages({
recommendations: 'Recommendations',
});
-const TvRecommendations: React.FC = () => {
+const TvRecommendations = () => {
const router = useRouter();
const intl = useIntl();
const { data: tvData } = useSWR(`/api/v1/tv/${router.query.tvId}`);
diff --git a/src/components/TvDetails/TvSimilar.tsx b/src/components/TvDetails/TvSimilar.tsx
index a8214747..fb261573 100644
--- a/src/components/TvDetails/TvSimilar.tsx
+++ b/src/components/TvDetails/TvSimilar.tsx
@@ -15,7 +15,7 @@ const messages = defineMessages({
similar: 'Similar Series',
});
-const TvSimilar: React.FC = () => {
+const TvSimilar = () => {
const router = useRouter();
const intl = useIntl();
const { data: tvData } = useSWR(`/api/v1/tv/${router.query.tvId}`);
diff --git a/src/components/TvDetails/index.tsx b/src/components/TvDetails/index.tsx
index f94c183b..2c768e31 100644
--- a/src/components/TvDetails/index.tsx
+++ b/src/components/TvDetails/index.tsx
@@ -74,7 +74,7 @@ interface TvDetailsProps {
tv?: TvDetailsType;
}
-const TvDetails: React.FC = ({ tv }) => {
+const TvDetails = ({ tv }: TvDetailsProps) => {
const settings = useSettings();
const { user, hasPermission } = useUser();
const router = useRouter();
diff --git a/src/components/UserList/BulkEditModal.tsx b/src/components/UserList/BulkEditModal.tsx
index 8a789e0b..c002a206 100644
--- a/src/components/UserList/BulkEditModal.tsx
+++ b/src/components/UserList/BulkEditModal.tsx
@@ -23,13 +23,13 @@ const messages = defineMessages({
edituser: 'Edit User Permissions',
});
-const BulkEditModal: React.FC = ({
+const BulkEditModal = ({
selectedUserIds,
users,
onCancel,
onComplete,
onSaving,
-}) => {
+}: BulkEditProps) => {
const { user: currentUser } = useUser();
const intl = useIntl();
const { addToast } = useToasts();
diff --git a/src/components/UserList/PlexImportModal.tsx b/src/components/UserList/PlexImportModal.tsx
index 1afb8773..93f355ec 100644
--- a/src/components/UserList/PlexImportModal.tsx
+++ b/src/components/UserList/PlexImportModal.tsx
@@ -25,10 +25,7 @@ const messages = defineMessages({
'The Enable New Plex Sign-In setting is currently enabled. Plex users with library access do not need to be imported in order to sign in.',
});
-const PlexImportModal: React.FC = ({
- onCancel,
- onComplete,
-}) => {
+const PlexImportModal = ({ onCancel, onComplete }: PlexImportProps) => {
const intl = useIntl();
const settings = useSettings();
const { addToast } = useToasts();
@@ -62,9 +59,7 @@ const PlexImportModal: React.FC = ({
addToast(
intl.formatMessage(messages.importedfromplex, {
userCount: createdUsers.length,
- strong: function strong(msg) {
- return {msg};
- },
+ strong: (msg: React.ReactNode) => {msg},
}),
{
autoDismiss: true,
@@ -125,11 +120,9 @@ const PlexImportModal: React.FC = ({
{settings.currentSettings.newPlexLogin && (
{msg}
- );
- },
+ strong: (msg: React.ReactNode) => (
+ {msg}
+ ),
})}
type="info"
/>
diff --git a/src/components/UserList/index.tsx b/src/components/UserList/index.tsx
index db2d310f..46d3ed1d 100644
--- a/src/components/UserList/index.tsx
+++ b/src/components/UserList/index.tsx
@@ -81,7 +81,7 @@ const messages = defineMessages({
type Sort = 'created' | 'updated' | 'requests' | 'displayname';
-const UserList: React.FC = () => {
+const UserList = () => {
const intl = useIntl();
const router = useRouter();
const settings = useSettings();
@@ -325,13 +325,11 @@ const UserList: React.FC = () => {
{!settings.currentSettings.localLogin && (
- {msg}
-
- );
- },
+ strong: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
})}
type="warning"
/>
@@ -374,9 +372,11 @@ const UserList: React.FC = () => {
inputMode="email"
/>
- {errors.email && touched.email && (
- {errors.email}
- )}
+ {errors.email &&
+ touched.email &&
+ typeof errors.email === 'string' && (
+ {errors.email}
+ )}
{
disabled={values.genpassword}
/>
- {errors.password && touched.password && (
- {errors.password}
- )}
+ {errors.password &&
+ touched.password &&
+ typeof errors.password === 'string' && (
+ {errors.password}
+ )}
@@ -680,9 +682,9 @@ const UserList: React.FC = () => {
? pageIndex * currentPageSize + data.results.length
: (pageIndex + 1) * currentPageSize,
total: data.pageInfo.results,
- strong: function strong(msg) {
- return {msg};
- },
+ strong: (msg: React.ReactNode) => (
+ {msg}
+ ),
})}
diff --git a/src/components/UserProfile/ProfileHeader/index.tsx b/src/components/UserProfile/ProfileHeader/index.tsx
index 2470a4f3..fd842808 100644
--- a/src/components/UserProfile/ProfileHeader/index.tsx
+++ b/src/components/UserProfile/ProfileHeader/index.tsx
@@ -18,10 +18,7 @@ interface ProfileHeaderProps {
isSettingsPage?: boolean;
}
-const ProfileHeader: React.FC = ({
- user,
- isSettingsPage,
-}) => {
+const ProfileHeader = ({ user, isSettingsPage }: ProfileHeaderProps) => {
const intl = useIntl();
const { user: loggedInUser, hasPermission } = useUser();
diff --git a/src/components/UserProfile/UserSettings/UserGeneralSettings/index.tsx b/src/components/UserProfile/UserSettings/UserGeneralSettings/index.tsx
index a6793cb5..27714407 100644
--- a/src/components/UserProfile/UserSettings/UserGeneralSettings/index.tsx
+++ b/src/components/UserProfile/UserSettings/UserGeneralSettings/index.tsx
@@ -51,7 +51,7 @@ const messages = defineMessages({
validationDiscordId: 'You must provide a valid Discord user ID',
});
-const UserGeneralSettings: React.FC = () => {
+const UserGeneralSettings = () => {
const intl = useIntl();
const { addToast } = useToasts();
const { locale, setLocale } = useLocale();
@@ -221,9 +221,11 @@ const UserGeneralSettings: React.FC = () => {
}
/>
- {errors.displayName && touched.displayName && (
- {errors.displayName}
- )}
+ {errors.displayName &&
+ touched.displayName &&
+ typeof errors.displayName === 'string' && (
+ {errors.displayName}
+ )}
@@ -232,17 +234,15 @@ const UserGeneralSettings: React.FC = () => {
{currentUser?.id === user?.id && (
{intl.formatMessage(messages.discordIdTip, {
- FindDiscordIdLink: function FindDiscordIdLink(msg) {
- return (
-
- {msg}
-
- );
- },
+ FindDiscordIdLink: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
})}
)}
@@ -251,9 +251,11 @@ const UserGeneralSettings: React.FC = () => {
- {errors.discordId && touched.discordId && (
-
{errors.discordId}
- )}
+ {errors.discordId &&
+ touched.discordId &&
+ typeof errors.discordId === 'string' && (
+
{errors.discordId}
+ )}
diff --git a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsDiscord.tsx b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsDiscord.tsx
index ca5c9b56..0d03506c 100644
--- a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsDiscord.tsx
+++ b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsDiscord.tsx
@@ -23,7 +23,7 @@ const messages = defineMessages({
validationDiscordId: 'You must provide a valid user ID',
});
-const UserNotificationsDiscord: React.FC = () => {
+const UserNotificationsDiscord = () => {
const intl = useIntl();
const { addToast } = useToasts();
const router = useRouter();
@@ -111,17 +111,15 @@ const UserNotificationsDiscord: React.FC = () => {
{currentUser?.id === user?.id && (
{intl.formatMessage(messages.discordIdTip, {
- FindDiscordIdLink: function FindDiscordIdLink(msg) {
- return (
-
- {msg}
-
- );
- },
+ FindDiscordIdLink: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
})}
)}
@@ -130,9 +128,11 @@ const UserNotificationsDiscord: React.FC = () => {
- {errors.discordId && touched.discordId && (
-
{errors.discordId}
- )}
+ {errors.discordId &&
+ touched.discordId &&
+ typeof errors.discordId === 'string' && (
+
{errors.discordId}
+ )}
{
+const UserEmailSettings = () => {
const intl = useIntl();
const { addToast } = useToasts();
const router = useRouter();
@@ -126,9 +126,11 @@ const UserEmailSettings: React.FC = () => {
className="font-mono text-xs"
/>
- {errors.pgpKey && touched.pgpKey && (
- {errors.pgpKey}
- )}
+ {errors.pgpKey &&
+ touched.pgpKey &&
+ typeof errors.pgpKey === 'string' && (
+ {errors.pgpKey}
+ )}
{
+const UserPushbulletSettings = () => {
const intl = useIntl();
const { addToast } = useToasts();
const router = useRouter();
@@ -105,20 +105,16 @@ const UserPushbulletSettings: React.FC = () => {
{data?.pushbulletAccessToken && (
{intl.formatMessage(messages.pushbulletAccessTokenTip, {
- PushbulletSettingsLink: function PushbulletSettingsLink(
- msg
- ) {
- return (
-
- {msg}
-
- );
- },
+ PushbulletSettingsLink: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
})}
)}
diff --git a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushover.tsx b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushover.tsx
index c0fe7cac..4a1cf0bf 100644
--- a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushover.tsx
+++ b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsPushover.tsx
@@ -28,7 +28,7 @@ const messages = defineMessages({
validationPushoverUserKey: 'You must provide a valid user or group key',
});
-const UserPushoverSettings: React.FC = () => {
+const UserPushoverSettings = () => {
const intl = useIntl();
const settings = useSettings();
const { addToast } = useToasts();
@@ -129,19 +129,16 @@ const UserPushoverSettings: React.FC = () => {
*
{intl.formatMessage(messages.pushoverApplicationTokenTip, {
- ApplicationRegistrationLink:
- function ApplicationRegistrationLink(msg) {
- return (
-
- {msg}
-
- );
- },
+ ApplicationRegistrationLink: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
applicationTitle: settings.currentSettings.applicationTitle,
})}
@@ -167,18 +164,16 @@ const UserPushoverSettings: React.FC = () => {
{intl.formatMessage(messages.pushoverUserKey)}
{intl.formatMessage(messages.pushoverUserKeyTip, {
- UsersGroupsLink: function UsersGroupsLink(msg) {
- return (
-
- {msg}
-
- );
- },
+ UsersGroupsLink: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
})}
@@ -190,9 +185,11 @@ const UserPushoverSettings: React.FC = () => {
type="text"
/>
- {errors.pushoverUserKey && touched.pushoverUserKey && (
- {errors.pushoverUserKey}
- )}
+ {errors.pushoverUserKey &&
+ touched.pushoverUserKey &&
+ typeof errors.pushoverUserKey === 'string' && (
+ {errors.pushoverUserKey}
+ )}
{
+const UserTelegramSettings = () => {
const intl = useIntl();
const { addToast } = useToasts();
const router = useRouter();
@@ -112,31 +112,25 @@ const UserTelegramSettings: React.FC = () => {
{data?.telegramBotUsername && (
{intl.formatMessage(messages.telegramChatIdTipLong, {
- TelegramBotLink: function TelegramBotLink(msg) {
- return (
-
- {msg}
-
- );
- },
- GetIdBotLink: function GetIdBotLink(msg) {
- return (
-
- {msg}
-
- );
- },
- code: function code(msg) {
- return {msg}
;
- },
+ TelegramBotLink: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
+ GetIdBotLink: (msg: React.ReactNode) => (
+
+ {msg}
+
+ ),
+ code: (msg: React.ReactNode) => {msg}
,
})}
)}
@@ -149,9 +143,11 @@ const UserTelegramSettings: React.FC = () => {
type="text"
/>
- {errors.telegramChatId && touched.telegramChatId && (
- {errors.telegramChatId}
- )}
+ {errors.telegramChatId &&
+ touched.telegramChatId &&
+ typeof errors.telegramChatId === 'string' && (
+ {errors.telegramChatId}
+ )}
diff --git a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush.tsx b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush.tsx
index 9445fde5..1438a050 100644
--- a/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush.tsx
+++ b/src/components/UserProfile/UserSettings/UserNotificationSettings/UserNotificationsWebPush.tsx
@@ -20,7 +20,7 @@ const messages = defineMessages({
webpushsettingsfailed: 'Web push notification settings failed to save.',
});
-const UserWebPushSettings: React.FC = () => {
+const UserWebPushSettings = () => {
const intl = useIntl();
const { addToast } = useToasts();
const router = useRouter();
diff --git a/src/components/UserProfile/UserSettings/UserNotificationSettings/index.tsx b/src/components/UserProfile/UserSettings/UserNotificationSettings/index.tsx
index 450e7951..ff219442 100644
--- a/src/components/UserProfile/UserSettings/UserNotificationSettings/index.tsx
+++ b/src/components/UserProfile/UserSettings/UserNotificationSettings/index.tsx
@@ -23,7 +23,13 @@ const messages = defineMessages({
webpush: 'Web Push',
});
-const UserNotificationSettings: React.FC = ({ children }) => {
+type UserNotificationSettingsProps = {
+ children: React.ReactNode;
+};
+
+const UserNotificationSettings = ({
+ children,
+}: UserNotificationSettingsProps) => {
const intl = useIntl();
const router = useRouter();
const { user } = useUser({ id: Number(router.query.userId) });
diff --git a/src/components/UserProfile/UserSettings/UserPasswordChange/index.tsx b/src/components/UserProfile/UserSettings/UserPasswordChange/index.tsx
index 6288f064..bf275675 100644
--- a/src/components/UserProfile/UserSettings/UserPasswordChange/index.tsx
+++ b/src/components/UserProfile/UserSettings/UserPasswordChange/index.tsx
@@ -39,7 +39,7 @@ const messages = defineMessages({
"You do not have permission to modify this user's password.",
});
-const UserPasswordChange: React.FC = () => {
+const UserPasswordChange = () => {
const intl = useIntl();
const { addToast } = useToasts();
const router = useRouter();
@@ -176,9 +176,11 @@ const UserPasswordChange: React.FC = () => {
autoComplete="current-password"
/>
- {errors.currentPassword && touched.currentPassword && (
- {errors.currentPassword}
- )}
+ {errors.currentPassword &&
+ touched.currentPassword &&
+ typeof errors.currentPassword === 'string' && (
+ {errors.currentPassword}
+ )}
)}
@@ -196,9 +198,11 @@ const UserPasswordChange: React.FC = () => {
autoComplete="new-password"
/>
- {errors.newPassword && touched.newPassword && (
- {errors.newPassword}
- )}
+ {errors.newPassword &&
+ touched.newPassword &&
+ typeof errors.newPassword === 'string' && (
+ {errors.newPassword}
+ )}
@@ -215,9 +219,11 @@ const UserPasswordChange: React.FC = () => {
autoComplete="new-password"
/>
- {errors.confirmPassword && touched.confirmPassword && (
- {errors.confirmPassword}
- )}
+ {errors.confirmPassword &&
+ touched.confirmPassword &&
+ typeof errors.confirmPassword === 'string' && (
+ {errors.confirmPassword}
+ )}
diff --git a/src/components/UserProfile/UserSettings/UserPermissions/index.tsx b/src/components/UserProfile/UserSettings/UserPermissions/index.tsx
index 1d9fe22d..b77d4bcc 100644
--- a/src/components/UserProfile/UserSettings/UserPermissions/index.tsx
+++ b/src/components/UserProfile/UserSettings/UserPermissions/index.tsx
@@ -22,7 +22,7 @@ const messages = defineMessages({
unauthorizedDescription: 'You cannot modify your own permissions.',
});
-const UserPermissions: React.FC = () => {
+const UserPermissions = () => {
const intl = useIntl();
const { addToast } = useToasts();
const router = useRouter();
diff --git a/src/components/UserProfile/UserSettings/index.tsx b/src/components/UserProfile/UserSettings/index.tsx
index 8e03709d..fbed2ba2 100644
--- a/src/components/UserProfile/UserSettings/index.tsx
+++ b/src/components/UserProfile/UserSettings/index.tsx
@@ -24,7 +24,11 @@ const messages = defineMessages({
"You do not have permission to modify this user's settings.",
});
-const UserSettings: React.FC = ({ children }) => {
+type UserSettingsProps = {
+ children: React.ReactNode;
+};
+
+const UserSettings = ({ children }: UserSettingsProps) => {
const router = useRouter();
const settings = useSettings();
const { user: currentUser } = useUser();
diff --git a/src/components/UserProfile/index.tsx b/src/components/UserProfile/index.tsx
index 565240fb..26813a98 100644
--- a/src/components/UserProfile/index.tsx
+++ b/src/components/UserProfile/index.tsx
@@ -37,7 +37,7 @@ const messages = defineMessages({
type MediaTitle = MovieDetails | TvDetails;
-const UserProfile: React.FC = () => {
+const UserProfile = () => {
const intl = useIntl();
const router = useRouter();
const { user, error } = useUser({
diff --git a/src/context/InteractionContext.tsx b/src/context/InteractionContext.tsx
index 0a78cdac..9622acbf 100644
--- a/src/context/InteractionContext.tsx
+++ b/src/context/InteractionContext.tsx
@@ -2,14 +2,15 @@ import React from 'react';
import useInteraction from '../hooks/useInteraction';
interface InteractionContextProps {
- isTouch: boolean;
+ isTouch?: boolean;
+ children?: React.ReactNode;
}
export const InteractionContext = React.createContext
({
isTouch: false,
});
-export const InteractionProvider: React.FC = ({ children }) => {
+export const InteractionProvider = ({ children }: InteractionContextProps) => {
const isTouch = useInteraction();
return (
diff --git a/src/context/SettingsContext.tsx b/src/context/SettingsContext.tsx
index e0c36e1f..45d6f574 100644
--- a/src/context/SettingsContext.tsx
+++ b/src/context/SettingsContext.tsx
@@ -4,6 +4,7 @@ import type { PublicSettingsResponse } from '../../server/interfaces/api/setting
export interface SettingsContextProps {
currentSettings: PublicSettingsResponse;
+ children?: React.ReactNode;
}
const defaultSettings = {
@@ -29,10 +30,10 @@ export const SettingsContext = React.createContext({
currentSettings: defaultSettings,
});
-export const SettingsProvider: React.FC = ({
+export const SettingsProvider = ({
children,
currentSettings,
-}) => {
+}: SettingsContextProps) => {
const { data, error } = useSWR(
'/api/v1/settings/public',
{ fallbackData: currentSettings }
diff --git a/src/context/UserContext.tsx b/src/context/UserContext.tsx
index 4f88e883..e81cda13 100644
--- a/src/context/UserContext.tsx
+++ b/src/context/UserContext.tsx
@@ -5,6 +5,7 @@ import { useUser } from '../hooks/useUser';
interface UserContextProps {
initialUser: User;
+ children?: React.ReactNode;
}
/**
@@ -12,10 +13,7 @@ interface UserContextProps {
* cache on server side render. It also will handle redirecting the user to
* the login page if their session ever becomes invalid.
*/
-export const UserContext: React.FC = ({
- initialUser,
- children,
-}) => {
+export const UserContext = ({ initialUser, children }: UserContextProps) => {
const { user, error, revalidate } = useUser({ initialData: initialUser });
const router = useRouter();
const routing = useRef(false);
diff --git a/src/hooks/useIsTouch.ts b/src/hooks/useIsTouch.ts
index 2f5ac983..6342b0ef 100644
--- a/src/hooks/useIsTouch.ts
+++ b/src/hooks/useIsTouch.ts
@@ -3,5 +3,5 @@ import { InteractionContext } from '../context/InteractionContext';
export const useIsTouch = (): boolean => {
const { isTouch } = useContext(InteractionContext);
- return isTouch;
+ return isTouch ?? false;
};
diff --git a/src/pages/404.tsx b/src/pages/404.tsx
index f4589467..eff80720 100644
--- a/src/pages/404.tsx
+++ b/src/pages/404.tsx
@@ -10,7 +10,7 @@ const messages = defineMessages({
returnHome: 'Return Home',
});
-const Custom404: React.FC = () => {
+const Custom404 = () => {
const intl = useIntl();
return (
diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx
index 3ff2e9ec..0abbd55f 100644
--- a/src/pages/_app.tsx
+++ b/src/pages/_app.tsx
@@ -21,6 +21,7 @@ import { SettingsProvider } from '../context/SettingsContext';
import { UserContext } from '../context/UserContext';
import type { User } from '../hooks/useUser';
import '../styles/globals.css';
+import { polyfillIntl } from '../utils/polyfillIntl';
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const loadLocaleData = (locale: AvailableLocale): Promise => {
@@ -241,6 +242,7 @@ CoreApp.getInitialProps = async (initialProps) => {
: currentSettings.locale;
const messages = await loadLocaleData(locale as AvailableLocale);
+ await polyfillIntl(locale);
return { ...appInitialProps, user, messages, locale, currentSettings };
};
diff --git a/src/pages/login/plex/loading.tsx b/src/pages/login/plex/loading.tsx
index c8ba268a..48746338 100644
--- a/src/pages/login/plex/loading.tsx
+++ b/src/pages/login/plex/loading.tsx
@@ -1,7 +1,7 @@
import React from 'react';
import LoadingSpinner from '../../../components/Common/LoadingSpinner';
-const PlexLoading: React.FC = () => {
+const PlexLoading = () => {
return (
diff --git a/src/pages/search.tsx b/src/pages/search.tsx
index 05ed18a8..55f95f13 100644
--- a/src/pages/search.tsx
+++ b/src/pages/search.tsx
@@ -1,7 +1,7 @@
import React from 'react';
import Search from '../components/Search';
-const SearchPage: React.FC = () => {
+const SearchPage = () => {
return ;
};
diff --git a/src/utils/polyfillIntl.ts b/src/utils/polyfillIntl.ts
new file mode 100644
index 00000000..0a9b79e3
--- /dev/null
+++ b/src/utils/polyfillIntl.ts
@@ -0,0 +1,37 @@
+import { shouldPolyfill as shouldPolyfillPluralrules } from '@formatjs/intl-pluralrules/should-polyfill';
+import { shouldPolyfill as shouldPolyfillLocale } from '@formatjs/intl-locale/should-polyfill';
+import { shouldPolyfill as shouldPolyfillDisplayNames } from '@formatjs/intl-displaynames/should-polyfill';
+
+const polyfillLocale = async () => {
+ if (shouldPolyfillLocale()) {
+ await import('@formatjs/intl-locale/polyfill');
+ }
+};
+
+const polyfillPluralRules = async (locale: string) => {
+ const unsupportedLocale = shouldPolyfillPluralrules(locale);
+ // This locale is supported
+ if (!unsupportedLocale) {
+ return;
+ }
+ // Load the polyfill 1st BEFORE loading data
+ await import('@formatjs/intl-pluralrules/polyfill-force');
+ await import(`@formatjs/intl-pluralrules/locale-data/${unsupportedLocale}`);
+};
+
+const polyfillDisplayNames = async (locale: string) => {
+ const unsupportedLocale = shouldPolyfillDisplayNames(locale);
+ // This locale is supported
+ if (!unsupportedLocale) {
+ return;
+ }
+ // Load the polyfill 1st BEFORE loading data
+ await import('@formatjs/intl-displaynames/polyfill-force');
+ await import(`@formatjs/intl-displaynames/locale-data/${unsupportedLocale}`);
+};
+
+export const polyfillIntl = async (locale: string) => {
+ await polyfillLocale();
+ await polyfillPluralRules(locale);
+ await polyfillDisplayNames(locale);
+};
diff --git a/yarn.lock b/yarn.lock
index d8122663..d8f15b20 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1646,14 +1646,6 @@
minimatch "^3.1.2"
strip-json-comments "^3.1.1"
-"@formatjs/ecma402-abstract@1.11.4":
- version "1.11.4"
- resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.4.tgz#b962dfc4ae84361f9f08fbce411b4e4340930eda"
- integrity sha512-EBikYFp2JCdIfGEb5G9dyCkTGDmC57KSHhRQOC3aYxoPWVZvfWCDjZwkGYHN7Lis/fmuWl906bnNTJifDQ3sXw==
- dependencies:
- "@formatjs/intl-localematcher" "0.2.25"
- tslib "^2.1.0"
-
"@formatjs/ecma402-abstract@1.11.8":
version "1.11.8"
resolved "https://registry.yarnpkg.com/@formatjs/ecma402-abstract/-/ecma402-abstract-1.11.8.tgz#f4015dfb6a837369d94c6ba82455c609e45bce20"
@@ -1676,21 +1668,12 @@
dependencies:
tslib "^2.0.1"
-"@formatjs/fast-memoize@1.2.1":
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/@formatjs/fast-memoize/-/fast-memoize-1.2.1.tgz#e6f5aee2e4fd0ca5edba6eba7668e2d855e0fc21"
- integrity sha512-Rg0e76nomkz3vF9IPlKeV+Qynok0r7YZjL6syLz4/urSg0IbjPZCB/iYUMNsYA643gh4mgrX3T7KEIFIxJBQeg==
- dependencies:
- tslib "^2.1.0"
-
-"@formatjs/icu-messageformat-parser@2.1.0":
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.1.0.tgz#a54293dd7f098d6a6f6a084ab08b6d54a3e8c12d"
- integrity sha512-Qxv/lmCN6hKpBSss2uQ8IROVnta2r9jd3ymUEIjm2UyIkUCHVcbUVRGL/KS/wv7876edvsPe+hjHVJ4z8YuVaw==
+"@formatjs/fast-memoize@1.2.4":
+ version "1.2.4"
+ resolved "https://registry.yarnpkg.com/@formatjs/fast-memoize/-/fast-memoize-1.2.4.tgz#4b5ddce9eb7803ff0bd4052387672151a8b7f8a0"
+ integrity sha512-9ARYoLR8AEzXvj2nYrOVHY/h1dDMDWGTnKDLXSISF1uoPakSmfcZuSqjiqZX2wRkEUimPxdwTu/agyozBtZRHA==
dependencies:
- "@formatjs/ecma402-abstract" "1.11.4"
- "@formatjs/icu-skeleton-parser" "1.3.6"
- tslib "^2.1.0"
+ tslib "2.4.0"
"@formatjs/icu-messageformat-parser@2.1.4":
version "2.1.4"
@@ -1709,38 +1692,39 @@
"@formatjs/ecma402-abstract" "1.11.8"
tslib "2.4.0"
-"@formatjs/icu-skeleton-parser@1.3.6":
- version "1.3.6"
- resolved "https://registry.yarnpkg.com/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.3.6.tgz#4ce8c0737d6f07b735288177049e97acbf2e8964"
- integrity sha512-I96mOxvml/YLrwU2Txnd4klA7V8fRhb6JG/4hm3VMNmeJo1F03IpV2L3wWt7EweqNLES59SZ4d6hVOPCSf80Bg==
+"@formatjs/intl-displaynames@6.0.3", "@formatjs/intl-displaynames@^6.0.3":
+ version "6.0.3"
+ resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-6.0.3.tgz#e648a91bccd9fb21519090eaafece3be9d15f480"
+ integrity sha512-Mxh6W1VOlmiEvO/QPBrBQHlXrIn5VxjJWyyEI0V7ZHNGl0ee8AjSlq7vIJG8GodRJqGUuutF6N3OB/6qFv0YWg==
dependencies:
- "@formatjs/ecma402-abstract" "1.11.4"
- tslib "^2.1.0"
+ "@formatjs/ecma402-abstract" "1.11.8"
+ "@formatjs/intl-localematcher" "0.2.28"
+ tslib "2.4.0"
-"@formatjs/intl-displaynames@5.4.3":
- version "5.4.3"
- resolved "https://registry.yarnpkg.com/@formatjs/intl-displaynames/-/intl-displaynames-5.4.3.tgz#e468586694350c722c7efab1a31fcde68aeaed8b"
- integrity sha512-4r12A3mS5dp5hnSaQCWBuBNfi9Amgx2dzhU4lTFfhSxgb5DOAiAbMpg6+7gpWZgl4ahsj3l2r/iHIjdmdXOE2Q==
+"@formatjs/intl-getcanonicallocales@2.0.2":
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/@formatjs/intl-getcanonicallocales/-/intl-getcanonicallocales-2.0.2.tgz#e9fd5d2215ce0dba4d8611b37ac87c5fae60a1a7"
+ integrity sha512-nMkPblAjgK49ORueVhyuKJDXOCq8at2h9Xf0lqabBZylaX3xLEeuAW2eMXuwJ/ascYYQnwuxeukd/qlzDkuJzQ==
dependencies:
- "@formatjs/ecma402-abstract" "1.11.4"
- "@formatjs/intl-localematcher" "0.2.25"
- tslib "^2.1.0"
+ tslib "2.4.0"
-"@formatjs/intl-listformat@6.5.3":
- version "6.5.3"
- resolved "https://registry.yarnpkg.com/@formatjs/intl-listformat/-/intl-listformat-6.5.3.tgz#f29da613a8062dc3e4e3d847ba890c3ea745f051"
- integrity sha512-ozpz515F/+3CU+HnLi5DYPsLa6JoCfBggBSSg/8nOB5LYSFW9+ZgNQJxJ8tdhKYeODT+4qVHX27EeJLoxLGLNg==
+"@formatjs/intl-listformat@7.0.3":
+ version "7.0.3"
+ resolved "https://registry.yarnpkg.com/@formatjs/intl-listformat/-/intl-listformat-7.0.3.tgz#8627969b77849559d148bc9536d0884c2271e6de"
+ integrity sha512-ampNLRGZl/08epHa3i5sRmcHGLneC6JrknexbbgnexYFNSmJ6AbL/dCzgrQzw2Efl+5AZK7UbNFxcDYY3RePvw==
dependencies:
- "@formatjs/ecma402-abstract" "1.11.4"
- "@formatjs/intl-localematcher" "0.2.25"
- tslib "^2.1.0"
+ "@formatjs/ecma402-abstract" "1.11.8"
+ "@formatjs/intl-localematcher" "0.2.28"
+ tslib "2.4.0"
-"@formatjs/intl-localematcher@0.2.25":
- version "0.2.25"
- resolved "https://registry.yarnpkg.com/@formatjs/intl-localematcher/-/intl-localematcher-0.2.25.tgz#60892fe1b271ec35ba07a2eb018a2dd7bca6ea3a"
- integrity sha512-YmLcX70BxoSopLFdLr1Ds99NdlTI2oWoLbaUW2M406lxOIPzE1KQhRz2fPUkq34xVZQaihCoU29h0KK7An3bhA==
+"@formatjs/intl-locale@^3.0.3":
+ version "3.0.3"
+ resolved "https://registry.yarnpkg.com/@formatjs/intl-locale/-/intl-locale-3.0.3.tgz#ae112831c06209d1d7286b36e7b824a5e84ddd63"
+ integrity sha512-AZrh8z/GaR+4ogy9LR1lKouXwXWKRK4TDtwFv6SIFIJgF9SQ6l4gdJ1/k13susw6NMAQiKdtG9IdhEtKXsp+6w==
dependencies:
- tslib "^2.1.0"
+ "@formatjs/ecma402-abstract" "1.11.8"
+ "@formatjs/intl-getcanonicallocales" "2.0.2"
+ tslib "2.4.0"
"@formatjs/intl-localematcher@0.2.28":
version "0.2.28"
@@ -1757,18 +1741,27 @@
"@formatjs/ecma402-abstract" "1.4.0"
tslib "^2.0.1"
-"@formatjs/intl@2.2.1":
- version "2.2.1"
- resolved "https://registry.yarnpkg.com/@formatjs/intl/-/intl-2.2.1.tgz#6daf4dabed055b17f467f0aa1bc073a626bc9189"
- integrity sha512-vgvyUOOrzqVaOFYzTf2d3+ToSkH2JpR7x/4U1RyoHQLmvEaTQvXJ7A2qm1Iy3brGNXC/+/7bUlc3lpH+h/LOJA==
- dependencies:
- "@formatjs/ecma402-abstract" "1.11.4"
- "@formatjs/fast-memoize" "1.2.1"
- "@formatjs/icu-messageformat-parser" "2.1.0"
- "@formatjs/intl-displaynames" "5.4.3"
- "@formatjs/intl-listformat" "6.5.3"
- intl-messageformat "9.13.0"
- tslib "^2.1.0"
+"@formatjs/intl-pluralrules@^5.0.3":
+ version "5.0.3"
+ resolved "https://registry.yarnpkg.com/@formatjs/intl-pluralrules/-/intl-pluralrules-5.0.3.tgz#78d76da83470495e3e4d82df8cd6250578c1685c"
+ integrity sha512-av3ks022vDE1dbCUAqwYc8bnGRcAPKK6C7ZRINNjjQn43ZQVX1AXc7PY2RqO/GXzkixsSWfHFZjSgzzbhbd21A==
+ dependencies:
+ "@formatjs/ecma402-abstract" "1.11.8"
+ "@formatjs/intl-localematcher" "0.2.28"
+ tslib "2.4.0"
+
+"@formatjs/intl@2.3.1":
+ version "2.3.1"
+ resolved "https://registry.yarnpkg.com/@formatjs/intl/-/intl-2.3.1.tgz#eccd6d03e4db18c256181f235b1d0a7f7aaebf5a"
+ integrity sha512-f06qZ/ukpeN24gc01qFjh3P+r3FU/ikY4yG+fDJu6dPNvpUQzDy98lYogA1dr6ig2UtrnoEk3xncyFPL1e9cZw==
+ dependencies:
+ "@formatjs/ecma402-abstract" "1.11.8"
+ "@formatjs/fast-memoize" "1.2.4"
+ "@formatjs/icu-messageformat-parser" "2.1.4"
+ "@formatjs/intl-displaynames" "6.0.3"
+ "@formatjs/intl-listformat" "7.0.3"
+ intl-messageformat "10.1.1"
+ tslib "2.4.0"
"@formatjs/ts-transformer@2.13.0", "@formatjs/ts-transformer@^2.6.0":
version "2.13.0"
@@ -3052,12 +3045,12 @@
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.4.tgz#cd667bcfdd025213aafb7ca5915a932590acdcdc"
integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==
-"@types/react-dom@17.0.17":
- version "17.0.17"
- resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.17.tgz#2e3743277a793a96a99f1bf87614598289da68a1"
- integrity sha512-VjnqEmqGnasQKV0CWLevqMTXBYG9GbwuE6x3VetERLh0cq2LTptFE73MrQi2S7GkKXCf2GgwItB/melLnxfnsg==
+"@types/react-dom@18.0.6":
+ version "18.0.6"
+ resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.0.6.tgz#36652900024842b74607a17786b6662dd1e103a1"
+ integrity sha512-/5OFZgfIPSwy+YuIBP/FgJnQnsxhZhjjrnxudMddeblOouIodEQ75X14Rr4wGSG/bknL+Omy9iWlLo1u/9GzAA==
dependencies:
- "@types/react" "^17"
+ "@types/react" "*"
"@types/react-transition-group@4.4.5":
version "4.4.5"
@@ -3073,10 +3066,10 @@
dependencies:
"@types/react" "*"
-"@types/react@*", "@types/react@16 || 17 || 18", "@types/react@17.0.45", "@types/react@^17":
- version "17.0.45"
- resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.45.tgz#9b3d5b661fd26365fefef0e766a1c6c30ccf7b3f"
- integrity sha512-YfhQ22Lah2e3CHPsb93tRwIGNiSwkuz1/blk4e6QrWS0jQzCSNbGLtOEYhPg02W0yGTTmpajp7dCTbBAMN3qsg==
+"@types/react@*", "@types/react@16 || 17 || 18", "@types/react@18.0.17":
+ version "18.0.17"
+ resolved "https://registry.yarnpkg.com/@types/react/-/react-18.0.17.tgz#4583d9c322d67efe4b39a935d223edcc7050ccf4"
+ integrity sha512-38ETy4tL+rn4uQQi7mB81G7V1g0u2ryquNmsVIOKUAEIDK+3CUjZ6rSRpdvS99dNBnkLFL83qfmtLacGOTIhwQ==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
@@ -7106,15 +7099,15 @@ intl-messageformat-parser@^5.3.7:
dependencies:
"@formatjs/intl-numberformat" "^5.5.2"
-intl-messageformat@9.13.0:
- version "9.13.0"
- resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-9.13.0.tgz#97360b73bd82212e4f6005c712a4a16053165468"
- integrity sha512-7sGC7QnSQGa5LZP7bXLDhVDtQOeKGeBFGHF2Y8LVBwYZoQZCgWeKoPGTa5GMG8g/TzDgeXuYJQis7Ggiw2xTOw==
+intl-messageformat@10.1.1:
+ version "10.1.1"
+ resolved "https://registry.yarnpkg.com/intl-messageformat/-/intl-messageformat-10.1.1.tgz#226767e7921fa86cef2cbe4a13911050716720bc"
+ integrity sha512-FeJne2oooYW6shLPbrqyjRX6hTELVrQ90Dn88z7NomLk/xZBCLxLPAkgaYaTQJBRBV78nZ933d8APHHkTQrD9Q==
dependencies:
- "@formatjs/ecma402-abstract" "1.11.4"
- "@formatjs/fast-memoize" "1.2.1"
- "@formatjs/icu-messageformat-parser" "2.1.0"
- tslib "^2.1.0"
+ "@formatjs/ecma402-abstract" "1.11.8"
+ "@formatjs/fast-memoize" "1.2.4"
+ "@formatjs/icu-messageformat-parser" "2.1.4"
+ tslib "2.4.0"
intl@1.2.5:
version "1.2.5"
@@ -10232,14 +10225,13 @@ react-animate-height@2.1.2:
classnames "^2.2.5"
prop-types "^15.6.1"
-react-dom@17.0.2:
- version "17.0.2"
- resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-17.0.2.tgz#ecffb6845e3ad8dbfcdc498f0d0a939736502c23"
- integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==
+react-dom@18.2.0:
+ version "18.2.0"
+ resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.2.0.tgz#22aaf38708db2674ed9ada224ca4aa708d821e3d"
+ integrity sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==
dependencies:
loose-envify "^1.1.0"
- object-assign "^4.1.1"
- scheduler "^0.20.2"
+ scheduler "^0.23.0"
react-fast-compare@^2.0.1:
version "2.0.4"
@@ -10251,21 +10243,21 @@ react-intersection-observer@9.4.0:
resolved "https://registry.yarnpkg.com/react-intersection-observer/-/react-intersection-observer-9.4.0.tgz#f6b6e616e625f9bf255857c5cba9dbf7b1825ec7"
integrity sha512-v0403CmomOVlzhqFXlzOxg0ziLcVq8mfbP0AwAcEQWgZmR2OulOT79Ikznw4UlB3N+jlUYqLMe4SDHUOyp0t2A==
-react-intl@5.25.1:
- version "5.25.1"
- resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-5.25.1.tgz#68a73aefc485c9bf70062381ae7f6f4791680879"
- integrity sha512-pkjdQDvpJROoXLMltkP/5mZb0/XqrqLoPGKUCfbdkP8m6U9xbK40K51Wu+a4aQqTEvEK5lHBk0fWzUV72SJ3Hg==
+react-intl@6.0.5:
+ version "6.0.5"
+ resolved "https://registry.yarnpkg.com/react-intl/-/react-intl-6.0.5.tgz#8adcb9108682c82e625a8ce7826283afd3537f62"
+ integrity sha512-nDZ3BosuE8WdovcGxsrjj1aIgJZklSL5aORs5oah+5tLQTzUdOEstzJEYQPM+sxl1dkDOu7RCuw0z9oI9ENf9g==
dependencies:
- "@formatjs/ecma402-abstract" "1.11.4"
- "@formatjs/icu-messageformat-parser" "2.1.0"
- "@formatjs/intl" "2.2.1"
- "@formatjs/intl-displaynames" "5.4.3"
- "@formatjs/intl-listformat" "6.5.3"
+ "@formatjs/ecma402-abstract" "1.11.8"
+ "@formatjs/icu-messageformat-parser" "2.1.4"
+ "@formatjs/intl" "2.3.1"
+ "@formatjs/intl-displaynames" "6.0.3"
+ "@formatjs/intl-listformat" "7.0.3"
"@types/hoist-non-react-statics" "^3.3.1"
"@types/react" "16 || 17 || 18"
hoist-non-react-statics "^3.3.2"
- intl-messageformat "9.13.0"
- tslib "^2.1.0"
+ intl-messageformat "10.1.1"
+ tslib "2.4.0"
react-is@^16.13.1, react-is@^16.7.0:
version "16.13.1"
@@ -10368,13 +10360,12 @@ react-use-clipboard@1.0.8:
dependencies:
copy-to-clipboard "^3.3.1"
-react@17.0.2:
- version "17.0.2"
- resolved "https://registry.yarnpkg.com/react/-/react-17.0.2.tgz#d0b5cc516d29eb3eee383f75b62864cfb6800037"
- integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==
+react@18.2.0:
+ version "18.2.0"
+ resolved "https://registry.yarnpkg.com/react/-/react-18.2.0.tgz#555bd98592883255fa00de14f1151a917b5d77d5"
+ integrity sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==
dependencies:
loose-envify "^1.1.0"
- object-assign "^4.1.1"
read-babelrc-up@^1.1.0:
version "1.1.0"
@@ -10848,13 +10839,12 @@ sax@>=0.6.0:
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
-scheduler@^0.20.2:
- version "0.20.2"
- resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.20.2.tgz#4baee39436e34aa93b4874bddcbf0fe8b8b50e91"
- integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==
+scheduler@^0.23.0:
+ version "0.23.0"
+ resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.0.tgz#ba8041afc3d30eb206a487b6b384002e4e61fdfe"
+ integrity sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==
dependencies:
loose-envify "^1.1.0"
- object-assign "^4.1.1"
schema-utils@*:
version "4.0.0"