diff --git a/app/javascript/flavours/glitch/components/load_gap.jsx b/app/javascript/flavours/glitch/components/load_gap.jsx
deleted file mode 100644
index 7a5e381eb1..0000000000
--- a/app/javascript/flavours/glitch/components/load_gap.jsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import PropTypes from 'prop-types';
-import { PureComponent } from 'react';
-
-import { injectIntl, defineMessages } from 'react-intl';
-
-import { Icon } from 'flavours/glitch/components/icon';
-
-const messages = defineMessages({
- load_more: { id: 'status.load_more', defaultMessage: 'Load more' },
-});
-
-class LoadGap extends PureComponent {
-
- static propTypes = {
- disabled: PropTypes.bool,
- maxId: PropTypes.string,
- onClick: PropTypes.func.isRequired,
- intl: PropTypes.object.isRequired,
- };
-
- handleClick = () => {
- this.props.onClick(this.props.maxId);
- };
-
- render () {
- const { disabled, intl } = this.props;
-
- return (
-
- );
- }
-
-}
-
-export default injectIntl(LoadGap);
diff --git a/app/javascript/flavours/glitch/components/load_gap.tsx b/app/javascript/flavours/glitch/components/load_gap.tsx
new file mode 100644
index 0000000000..77d1143a9f
--- /dev/null
+++ b/app/javascript/flavours/glitch/components/load_gap.tsx
@@ -0,0 +1,36 @@
+import { useCallback } from 'react';
+
+import type { InjectedIntl } from 'react-intl';
+import { injectIntl, defineMessages } from 'react-intl';
+
+import { Icon } from 'flavours/glitch/components/icon';
+
+const messages = defineMessages({
+ load_more: { id: 'status.load_more', defaultMessage: 'Load more' },
+});
+
+interface Props {
+ disabled: boolean;
+ maxId: string;
+ onClick: (maxId: string) => void;
+ intl: InjectedIntl;
+}
+
+export const LoadGap = injectIntl(
+ ({ disabled, maxId, onClick, intl }) => {
+ const handleClick = useCallback(() => {
+ onClick(maxId);
+ }, [maxId, onClick]);
+
+ return (
+
+ );
+ }
+);
diff --git a/app/javascript/flavours/glitch/components/status_list.jsx b/app/javascript/flavours/glitch/components/status_list.jsx
index 29fa174407..f28c42582c 100644
--- a/app/javascript/flavours/glitch/components/status_list.jsx
+++ b/app/javascript/flavours/glitch/components/status_list.jsx
@@ -8,7 +8,7 @@ import { debounce } from 'lodash';
import RegenerationIndicator from 'flavours/glitch/components/regeneration_indicator';
import StatusContainer from 'flavours/glitch/containers/status_container';
-import LoadGap from './load_gap';
+import { LoadGap } from './load_gap';
import ScrollableList from './scrollable_list';
export default class StatusList extends ImmutablePureComponent {
diff --git a/app/javascript/flavours/glitch/features/notifications/index.jsx b/app/javascript/flavours/glitch/features/notifications/index.jsx
index ecb5152df9..d84d29f112 100644
--- a/app/javascript/flavours/glitch/features/notifications/index.jsx
+++ b/app/javascript/flavours/glitch/features/notifications/index.jsx
@@ -28,7 +28,7 @@ import { compareId } from 'flavours/glitch/compare_id';
import Column from 'flavours/glitch/components/column';
import ColumnHeader from 'flavours/glitch/components/column_header';
import { Icon } from 'flavours/glitch/components/icon';
-import LoadGap from 'flavours/glitch/components/load_gap';
+import { LoadGap } from 'flavours/glitch/components/load_gap';
import { NotSignedInIndicator } from 'flavours/glitch/components/not_signed_in_indicator';
import ScrollableList from 'flavours/glitch/components/scrollable_list';
import NotificationPurgeButtonsContainer from 'flavours/glitch/containers/notification_purge_buttons_container';