mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
New: Browse Lists from Discover Movies Page
This commit is contained in:
43
frontend/src/Components/ImportListList.js
Normal file
43
frontend/src/Components/ImportListList.js
Normal file
@@ -0,0 +1,43 @@
|
||||
import _ from 'lodash';
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import { kinds, sizes } from 'Helpers/Props';
|
||||
import Label from './Label';
|
||||
import styles from './ImportListList.css';
|
||||
|
||||
function ImportListList({ lists, importListList }) {
|
||||
return (
|
||||
<div className={styles.lists}>
|
||||
{
|
||||
lists.map((t) => {
|
||||
const list = _.find(importListList, { id: t });
|
||||
|
||||
if (!list) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<Label
|
||||
key={list.id}
|
||||
kind={kinds.INFO}
|
||||
size={sizes.MEDIUM}
|
||||
>
|
||||
{list.name}
|
||||
</Label>
|
||||
);
|
||||
})
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
ImportListList.propTypes = {
|
||||
lists: PropTypes.arrayOf(PropTypes.number).isRequired,
|
||||
importListList: PropTypes.arrayOf(PropTypes.object).isRequired
|
||||
};
|
||||
|
||||
ImportListList.defaultProps = {
|
||||
lists: []
|
||||
};
|
||||
|
||||
export default ImportListList;
|
Reference in New Issue
Block a user