Convert UploadArea to tsx

edit-profile-fix
Alex Gleason 2022-05-01 12:46:06 -05:00
rodzic e20a083fb4
commit 5def7a087d
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 11 dodań i 15 usunięć

Wyświetl plik

@ -1,4 +1,3 @@
import PropTypes from 'prop-types';
import * as React from 'react';
import { defineMessages, useIntl } from 'react-intl';
@ -75,9 +74,4 @@ const DeleteAccount = () => {
);
};
DeleteAccount.propTypes = {
intl: PropTypes.object,
dispatch: PropTypes.func,
};
export default DeleteAccount;

Wyświetl plik

@ -1,15 +1,22 @@
import classNames from 'classnames';
import PropTypes from 'prop-types';
import * as React from 'react';
import { FormattedMessage } from 'react-intl';
import spring from 'react-motion/lib/spring';
import { spring } from 'react-motion';
import { Icon, Stack, Text } from 'soapbox/components/ui';
import Motion from '../../ui/util/optional_motion';
const UploadArea = ({ active, onClose }) => {
const handleKeyUp = (e) => {
interface IUploadArea {
/** Whether the upload area is active. */
active: boolean,
/** Callback when the upload area is closed. */
onClose: () => void,
}
/** Component to display when a file is dragged over the UI. */
const UploadArea: React.FC<IUploadArea> = ({ active, onClose }) => {
const handleKeyUp = (e: KeyboardEvent) => {
const keyCode = e.keyCode;
if (active) {
@ -63,9 +70,4 @@ const UploadArea = ({ active, onClose }) => {
);
};
UploadArea.propTypes = {
active: PropTypes.bool,
onClose: PropTypes.func,
};
export default UploadArea;