mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-15 03:53:51 +00:00
Created filtering by tag feature
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
import caretDownIcon from '@fortawesome/fontawesome-free-solid/faCaretDown';
|
||||
import caretUpIcon from '@fortawesome/fontawesome-free-solid/faCaretUp';
|
||||
import FontAwesomeIcon from '@fortawesome/react-fontawesome';
|
||||
import { isEmpty } from 'ramda';
|
||||
import { isEmpty, pick } from 'ramda';
|
||||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import Tag from '../utils/Tag';
|
||||
import { ShortUrlsRow } from './helpers/ShortUrlsRow';
|
||||
import { listShortUrls } from './reducers/shortUrlsList';
|
||||
import './ShortUrlsList.scss';
|
||||
import { pick } from 'ramda';
|
||||
|
||||
export class ShortUrlsList extends React.Component {
|
||||
refreshList = extraParams => {
|
||||
@@ -110,17 +108,14 @@ export class ShortUrlsList extends React.Component {
|
||||
}
|
||||
|
||||
return shortUrlsList.map(shortUrl => (
|
||||
<ShortUrlsRow shortUrl={shortUrl} selectedServer={selectedServer} key={shortUrl.shortCode} />
|
||||
<ShortUrlsRow
|
||||
shortUrl={shortUrl}
|
||||
selectedServer={selectedServer}
|
||||
key={shortUrl.shortCode}
|
||||
refreshList={this.refreshList}
|
||||
/>
|
||||
));
|
||||
}
|
||||
|
||||
static renderTags(tags) {
|
||||
if (isEmpty(tags)) {
|
||||
return <i className="nowrap"><small>No tags</small></i>;
|
||||
}
|
||||
|
||||
return tags.map(tag => <Tag text={tag} />);
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(pick(['selectedServer', 'shortUrlsListParams']), { listShortUrls })(ShortUrlsList);
|
||||
|
||||
Reference in New Issue
Block a user