diff --git a/app/javascript/flavours/glitch/components/status.jsx b/app/javascript/flavours/glitch/components/status.jsx
index 5ede4c2f53b7cf..4ca7c7ba16329c 100644
--- a/app/javascript/flavours/glitch/components/status.jsx
+++ b/app/javascript/flavours/glitch/components/status.jsx
@@ -22,10 +22,10 @@ import { MediaGallery, Video, Audio } from '../features/ui/util/async-components
import AttachmentList from './attachment_list';
import StatusActionBar from './status_action_bar';
import StatusContent from './status_content';
+import StatusExpandButton from './status_expand_button';
import StatusHeader from './status_header';
import StatusIcons from './status_icons';
import StatusPrepend from './status_prepend';
-import StatusExpandButton from './status_expand_button';
const domParser = new DOMParser();
diff --git a/app/javascript/flavours/glitch/components/status_content.jsx b/app/javascript/flavours/glitch/components/status_content.jsx
index 4f160977ae3fd2..cfedc1ad037ed3 100644
--- a/app/javascript/flavours/glitch/components/status_content.jsx
+++ b/app/javascript/flavours/glitch/components/status_content.jsx
@@ -8,12 +8,11 @@ import classnames from 'classnames';
import ImmutablePropTypes from 'react-immutable-proptypes';
import { connect } from 'react-redux';
-import { Icon } from 'flavours/glitch/components/icon';
import { autoPlayGif, languages as preloadedLanguages } from 'flavours/glitch/initial_state';
import { decode as decodeIDNA } from 'flavours/glitch/utils/idna';
-import StatusExpandButton from './status_expand_button';
import Permalink from './permalink';
+import StatusExpandButton from './status_expand_button';
const textMatchesTarget = (text, origin, host) => {
return (text === origin || text === host
diff --git a/app/javascript/flavours/glitch/components/status_expand_button.js b/app/javascript/flavours/glitch/components/status_expand_button.js
deleted file mode 100644
index 3f5d8638640147..00000000000000
--- a/app/javascript/flavours/glitch/components/status_expand_button.js
+++ /dev/null
@@ -1,71 +0,0 @@
-import React from 'react';
-import { useState, useEffect } from 'react';
-import PropTypes from 'prop-types';
-import { FormattedMessage } from 'react-intl';
-import Icon from './icon';
-
-
-const StatusExpandButton=(
- {
- hidden,
- handleSpoilerClick,
- mediaIcons,
- },
-)=>{
- const makeToggleText = () => {
- let newText;
- if (hidden) {
- newText = [
- ,
- ];
- if (mediaIcons) {
- mediaIcons.forEach((mediaIcon, idx) => {
- newText.push(
- ,
- );
- });
- }
- } else {
- newText = (
-
- );
- }
- return(newText);
- };
-
- // const [hidden, setHidden] = useState(false);
- const [toggleText, setToggleText] = useState(makeToggleText());
-
- // Change the text when the hidden state changes
- useEffect(() => {
- setToggleText(makeToggleText());
- }, [hidden]);
-
- return(
-
- );
-};
-
-StatusExpandButton.propTypes = {
- hidden: PropTypes.bool,
- handleSpoilerClick: PropTypes.func,
- mediaIcons: PropTypes.arrayOf(PropTypes.string),
-};
-
-export default StatusExpandButton;
diff --git a/app/javascript/flavours/glitch/components/status_expand_button.jsx b/app/javascript/flavours/glitch/components/status_expand_button.jsx
new file mode 100644
index 00000000000000..3f425cfbcc2f7c
--- /dev/null
+++ b/app/javascript/flavours/glitch/components/status_expand_button.jsx
@@ -0,0 +1,71 @@
+import PropTypes from 'prop-types';
+import React, { useState, useEffect } from 'react';
+
+import { FormattedMessage } from 'react-intl';
+
+import { Icon } from './icon';
+
+const makeToggleText = (hidden, mediaIcons) => {
+ let newText;
+ if (hidden) {
+ newText = [
+ ,
+ ];
+ if (mediaIcons) {
+ mediaIcons.forEach((mediaIcon, idx) => {
+ newText.push(
+ ,
+ );
+ });
+ }
+ } else {
+ newText = (
+
+ );
+ }
+ return(newText);
+};
+
+const StatusExpandButton=(
+ {
+ hidden,
+ handleSpoilerClick,
+ mediaIcons,
+ },
+) => {
+ const [toggleText, setToggleText] = useState(makeToggleText(hidden, mediaIcons));
+
+ // Change the text when the hidden state changes
+ useEffect(() => {
+ let text = makeToggleText(hidden, mediaIcons);
+ setToggleText(text);
+ }, [hidden, mediaIcons]);
+
+ return(
+
+ );
+};
+
+StatusExpandButton.propTypes = {
+ hidden: PropTypes.bool,
+ handleSpoilerClick: PropTypes.func,
+ mediaIcons: PropTypes.arrayOf(PropTypes.string),
+};
+
+export default StatusExpandButton;