From 149aa07409ef7cd17098a28510e515530b173f13 Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Sat, 20 Apr 2019 19:18:26 +0200 Subject: DrawerResults → SearchResults + SearchResultsContainer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../glitch/features/compose/results/index.js | 78 ---------------------- 1 file changed, 78 deletions(-) delete mode 100644 app/javascript/flavours/glitch/features/compose/results/index.js (limited to 'app/javascript/flavours/glitch/features/compose/results') diff --git a/app/javascript/flavours/glitch/features/compose/results/index.js b/app/javascript/flavours/glitch/features/compose/results/index.js deleted file mode 100644 index 162d14913..000000000 --- a/app/javascript/flavours/glitch/features/compose/results/index.js +++ /dev/null @@ -1,78 +0,0 @@ -// Package imports. -import PropTypes from 'prop-types'; -import React from 'react'; -import ImmutablePureComponent from 'react-immutable-pure-component'; -import ImmutablePropTypes from 'react-immutable-proptypes'; -import { FormattedMessage, defineMessages, injectIntl } from 'react-intl'; -import { Link } from 'react-router-dom'; - -// Components. -import Icon from 'flavours/glitch/components/icon'; -import AccountContainer from 'flavours/glitch/containers/account_container'; -import StatusContainer from 'flavours/glitch/containers/status_container'; -import Hashtag from 'flavours/glitch/components/hashtag'; - -// Messages. -// The component. -export default @injectIntl -class DrawerResults extends ImmutablePureComponent { - - static propTypes = { - results: ImmutablePropTypes.map.isRequired, - intl: PropTypes.object.isRequired, - }; - - render() { - const { intl, results } = this.props; - - let accounts, statuses, hashtags; - let count = 0; - - if (results.get('accounts') && results.get('accounts').size > 0) { - count += results.get('accounts').size; - accounts = ( -
-
- - {results.get('accounts').map(accountId => )} -
- ); - } - - if (results.get('statuses') && results.get('statuses').size > 0) { - count += results.get('statuses').size; - statuses = ( -
-
- - {results.get('statuses').map(statusId => )} -
- ); - } - - if (results.get('hashtags') && results.get('hashtags').size > 0) { - count += results.get('hashtags').size; - hashtags = ( -
-
- - {results.get('hashtags').map(hashtag => )} -
- ); - } - - // The result. - return ( -
-
- - -
- - {accounts} - {statuses} - {hashtags} -
- ); - }; -} -- cgit