From 82b01a6c9f13ab63818da3bfb8ee9cfcfda0cdd6 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 18 Dec 2018 18:52:37 +0100 Subject: [Glitch] Put "Media Only" option in column settings instead of content area headline Port 4f42238c294f92dbd87db3d83f9514344fcd1f8a to glitch-soc --- .../components/section_headline.js | 59 ---------------------- 1 file changed, 59 deletions(-) delete mode 100644 app/javascript/flavours/glitch/features/community_timeline/components/section_headline.js (limited to 'app/javascript/flavours/glitch/features/community_timeline/components/section_headline.js') diff --git a/app/javascript/flavours/glitch/features/community_timeline/components/section_headline.js b/app/javascript/flavours/glitch/features/community_timeline/components/section_headline.js deleted file mode 100644 index 8c0c68cdc..000000000 --- a/app/javascript/flavours/glitch/features/community_timeline/components/section_headline.js +++ /dev/null @@ -1,59 +0,0 @@ -import PropTypes from 'prop-types'; -import React, { Component, Fragment } from 'react'; -import { FormattedMessage } from 'react-intl'; -import { NavLink } from 'react-router-dom'; - -export default class SectionHeadline extends Component { - - static propTypes = { - timelineId: PropTypes.string.isRequired, - to: PropTypes.string.isRequired, - pinned: PropTypes.bool.isRequired, - onlyMedia: PropTypes.bool.isRequired, - onClick: PropTypes.func, - }; - - shouldComponentUpdate (nextProps) { - return ( - this.props.onlyMedia !== nextProps.onlyMedia || - this.props.pinned !== nextProps.pinned || - this.props.to !== nextProps.to || - this.props.timelineId !== nextProps.timelineId - ); - } - - handleClick = e => { - const { onClick } = this.props; - - if (typeof onClick === 'function') { - e.preventDefault(); - - onClick.call(this, e); - } - } - - render () { - const { timelineId, to, pinned, onlyMedia } = this.props; - - return ( -
- {pinned ? ( - - - - - - - - - ) : ( - - - - - )} -
- ); - } - -} -- cgit