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

@@ -46,7 +46,7 @@ const messages = defineMessages({
validationPgpPassword: 'You must provide a PGP password',
});
export function OpenPgpLink(msg: string): JSX.Element {
export function OpenPgpLink(msg: React.ReactNode) {
return (
<a href="https://www.openpgp.org/" target="_blank" rel="noreferrer">
{msg}
@@ -54,7 +54,7 @@ export function OpenPgpLink(msg: string): JSX.Element {
);
}
const NotificationsEmail: React.FC = () => {
const NotificationsEmail = () => {
const intl = useIntl();
const { addToast, removeToast } = useToasts();
const [isTesting, setIsTesting] = useState(false);
@@ -265,9 +265,11 @@ const NotificationsEmail: React.FC = () => {
inputMode="email"
/>
</div>
{errors.emailFrom && touched.emailFrom && (
<div className="error">{errors.emailFrom}</div>
)}
{errors.emailFrom &&
touched.emailFrom &&
typeof errors.emailFrom === 'string' && (
<div className="error">{errors.emailFrom}</div>
)}
</div>
</div>
<div className="form-row">
@@ -284,9 +286,11 @@ const NotificationsEmail: React.FC = () => {
inputMode="url"
/>
</div>
{errors.smtpHost && touched.smtpHost && (
<div className="error">{errors.smtpHost}</div>
)}
{errors.smtpHost &&
touched.smtpHost &&
typeof errors.smtpHost === 'string' && (
<div className="error">{errors.smtpHost}</div>
)}
</div>
</div>
<div className="form-row">
@@ -302,9 +306,11 @@ const NotificationsEmail: React.FC = () => {
inputMode="numeric"
className="short"
/>
{errors.smtpPort && touched.smtpPort && (
<div className="error">{errors.smtpPort}</div>
)}
{errors.smtpPort &&
touched.smtpPort &&
typeof errors.smtpPort === 'string' && (
<div className="error">{errors.smtpPort}</div>
)}
</div>
</div>
<div className="form-row">
@@ -396,9 +402,11 @@ const NotificationsEmail: React.FC = () => {
className="font-mono text-xs"
/>
</div>
{errors.pgpPrivateKey && touched.pgpPrivateKey && (
<div className="error">{errors.pgpPrivateKey}</div>
)}
{errors.pgpPrivateKey &&
touched.pgpPrivateKey &&
typeof errors.pgpPrivateKey === 'string' && (
<div className="error">{errors.pgpPrivateKey}</div>
)}
</div>
</div>
<div className="form-row">
@@ -424,9 +432,11 @@ const NotificationsEmail: React.FC = () => {
autoComplete="one-time-code"
/>
</div>
{errors.pgpPassword && touched.pgpPassword && (
<div className="error">{errors.pgpPassword}</div>
)}
{errors.pgpPassword &&
touched.pgpPassword &&
typeof errors.pgpPassword === 'string' && (
<div className="error">{errors.pgpPassword}</div>
)}
</div>
</div>
<div className="actions">