LoginForm: convert to tsx
This commit is contained in:
parent
7630c64ddd
commit
79c04713e1
|
@ -1,9 +1,8 @@
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { FormattedMessage, defineMessages, useIntl } from 'react-intl';
|
import { FormattedMessage, defineMessages, useIntl } from 'react-intl';
|
||||||
import { Link } from 'react-router-dom';
|
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({
|
const messages = defineMessages({
|
||||||
username: {
|
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();
|
const intl = useIntl();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -82,9 +86,4 @@ const LoginForm = ({ isLoading, handleSubmit }) => {
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
LoginForm.propTypes = {
|
|
||||||
isLoading: PropTypes.bool.isRequired,
|
|
||||||
handleSubmit: PropTypes.func.isRequired,
|
|
||||||
};
|
|
||||||
|
|
||||||
export default LoginForm;
|
export default LoginForm;
|
Loading…
Reference in New Issue