chore(deps): update react to 18 (#2943)

This commit is contained in:
Ryan Cohen
2022-08-18 17:05:58 +09:00
committed by GitHub
parent 72d7a3477f
commit e5d8c93ab8
164 changed files with 982 additions and 915 deletions

View File

@@ -35,13 +35,13 @@ interface QuotaDisplayProps {
overLimit?: number;
}
const QuotaDisplay: React.FC<QuotaDisplayProps> = ({
const QuotaDisplay = ({
quota,
mediaType,
userOverride,
remaining,
overLimit,
}) => {
}: QuotaDisplayProps) => {
const intl = useIntl();
const [showDetails, setShowDetails] = useState(false);
return (
@@ -79,9 +79,7 @@ const QuotaDisplay: React.FC<QuotaDisplayProps> = ({
type: intl.formatMessage(
mediaType === 'movie' ? messages.movie : messages.season
),
strong: function strong(msg) {
return <span className="font-bold">{msg}</span>;
},
strong: (msg: React.ReactNode) => <strong>{msg}</strong>,
})}
</div>
</div>
@@ -103,9 +101,7 @@ const QuotaDisplay: React.FC<QuotaDisplayProps> = ({
: messages.requiredquota,
{
seasons: overLimit,
strong: function strong(msg) {
return <span className="font-bold">{msg}</span>;
},
strong: (msg: React.ReactNode) => <strong>{msg}</strong>,
}
)}
</div>
@@ -124,9 +120,7 @@ const QuotaDisplay: React.FC<QuotaDisplayProps> = ({
: messages.seasonlimit,
{ limit: quota?.limit }
),
strong: function strong(msg) {
return <span className="font-bold">{msg}</span>;
},
strong: (msg: React.ReactNode) => <strong>{msg}</strong>,
}
)}
</div>
@@ -134,19 +128,15 @@ const QuotaDisplay: React.FC<QuotaDisplayProps> = ({
{intl.formatMessage(
userOverride ? messages.quotaLinkUser : messages.quotaLink,
{
ProfileLink: function ProfileLink(msg) {
return (
<Link
href={
userOverride ? `/users/${userOverride}` : '/profile'
}
>
<a className="text-white transition duration-300 hover:underline">
{msg}
</a>
</Link>
);
},
ProfileLink: (msg: React.ReactNode) => (
<Link
href={userOverride ? `/users/${userOverride}` : '/profile'}
>
<a className="text-white transition duration-300 hover:underline">
{msg}
</a>
</Link>
),
}
)}
</div>