revert MetaRow changes

This commit is contained in:
nklhrstv 2022-05-18 14:09:24 +03:00
parent d812e50bd2
commit a1d39cf181
2 changed files with 6 additions and 10 deletions

View file

@ -10,9 +10,9 @@ const CONSTANTS = require('stremio/common/CONSTANTS');
const MetaRowPlaceholder = require('./MetaRowPlaceholder');
const styles = require('./styles');
const MetaRow = React.forwardRef(({ className, title, message, items, itemComponent, deepLinks, ...props }, ref) => {
const MetaRow = ({ className, title, message, items, itemComponent, deepLinks }) => {
return (
<div {...props} ref={ref} className={classnames(className, styles['meta-row-container'])}>
<div className={classnames(className, styles['meta-row-container'])}>
{
(typeof title === 'string' && title.length > 0) || (deepLinks && (typeof deepLinks.discover === 'string' || typeof deepLinks.library === 'string')) ?
<div className={styles['header-container']}>
@ -59,9 +59,7 @@ const MetaRow = React.forwardRef(({ className, title, message, items, itemCompon
}
</div>
);
});
MetaRow.displayName = 'MetaRow';
};
MetaRow.Placeholder = MetaRowPlaceholder;

View file

@ -8,9 +8,9 @@ const Button = require('stremio/common/Button');
const CONSTANTS = require('stremio/common/CONSTANTS');
const styles = require('./styles');
const MetaRowPlaceholder = React.forwardRef(({ className, title, deepLinks, ...props }, ref) => {
const MetaRowPlaceholder = ({ className, title, deepLinks }) => {
return (
<div {...props} ref={ref} className={classnames(className, styles['meta-row-placeholder-container'])}>
<div className={classnames(className, styles['meta-row-placeholder-container'])}>
<div className={styles['header-container']}>
<div className={styles['title-container']} title={typeof title === 'string' && title.length > 0 ? title : null}>
{typeof title === 'string' && title.length > 0 ? title : null}
@ -37,9 +37,7 @@ const MetaRowPlaceholder = React.forwardRef(({ className, title, deepLinks, ...p
</div>
</div>
);
});
MetaRowPlaceholder.displayName = 'MetaRowPlaceholder';
};
MetaRowPlaceholder.propTypes = {
className: PropTypes.string,