You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
657 B
29 lines
657 B
import PropTypes from 'prop-types';
|
|
import React from 'react';
|
|
import styles from './MovieAlternateTitles.css';
|
|
|
|
function MovieAlternateTitles({ alternateTitles }) {
|
|
return (
|
|
<ul>
|
|
{
|
|
alternateTitles.filter((x, i, a) => a.indexOf(x) === i).map((alternateTitle) => {
|
|
return (
|
|
<li
|
|
key={alternateTitle}
|
|
className={styles.alternateTitle}
|
|
>
|
|
{alternateTitle}
|
|
</li>
|
|
);
|
|
})
|
|
}
|
|
</ul>
|
|
);
|
|
}
|
|
|
|
MovieAlternateTitles.propTypes = {
|
|
alternateTitles: PropTypes.arrayOf(PropTypes.string).isRequired
|
|
};
|
|
|
|
export default MovieAlternateTitles;
|