From 31028939c7fdc88c88db2209b943995310b74e4d Mon Sep 17 00:00:00 2001 From: sneakers-the-rat Date: Fri, 6 Oct 2023 20:28:26 -0700 Subject: [PATCH 1/4] fix linting errors --- .../flavours/glitch/components/status.jsx | 2 +- .../glitch/components/status_content.jsx | 3 +- .../glitch/components/status_expand_button.js | 71 ------------------- .../components/status_expand_button.jsx | 71 +++++++++++++++++++ 4 files changed, 73 insertions(+), 74 deletions(-) delete mode 100644 app/javascript/flavours/glitch/components/status_expand_button.js create mode 100644 app/javascript/flavours/glitch/components/status_expand_button.jsx 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( -