LoginForm: convert to tsx

revert-5af0e40a
Alex Gleason 2022-04-19 15:06:35 -05:00
rodzic 7630c64ddd
commit 79c04713e1
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 7 dodań i 8 usunięć

Wyświetl plik

@ -1,9 +1,8 @@
import PropTypes from 'prop-types';
import React from 'react';
import { FormattedMessage, defineMessages, useIntl } from 'react-intl';
import { Link } from 'react-router-dom';
import { Button, Form, FormActions, FormGroup, Input } from '../../../components/ui';
import { Button, Form, FormActions, FormGroup, Input } from 'soapbox/components/ui';
const messages = defineMessages({
username: {
@ -20,7 +19,12 @@ const messages = defineMessages({
},
});
const LoginForm = ({ isLoading, handleSubmit }) => {
interface ILoginForm {
isLoading: boolean,
handleSubmit: React.FormEventHandler,
}
const LoginForm: React.FC<ILoginForm> = ({ isLoading, handleSubmit }) => {
const intl = useIntl();
return (
@ -82,9 +86,4 @@ const LoginForm = ({ isLoading, handleSubmit }) => {
);
};
LoginForm.propTypes = {
isLoading: PropTypes.bool.isRequired,
handleSubmit: PropTypes.func.isRequired,
};
export default LoginForm;