mirror of
https://github.com/mue/mue.git
synced 2026-07-16 05:23:49 +02:00
fix: marketplace "more from"
This commit is contained in:
@@ -53,7 +53,7 @@ class Item extends PureComponent {
|
||||
})();
|
||||
this.setState({
|
||||
moreByCurator: data.items.filter(
|
||||
(item) => item.type !== convertedType && item.name !== this.props.data.data.name,
|
||||
(item) => item.type === convertedType && item.name !== this.props.data.data.name,
|
||||
),
|
||||
});
|
||||
console.log(this.state.curator);
|
||||
@@ -371,7 +371,7 @@ class Item extends PureComponent {
|
||||
<div key={`${item.type}/${item.name}`}>{item.display_name}</div>
|
||||
))} */}
|
||||
<Items
|
||||
hideCurator={true}
|
||||
isCurator={true}
|
||||
type={'all'}
|
||||
items={this.state.moreByCurator}
|
||||
onCollection={this.state.collection}
|
||||
|
||||
@@ -15,7 +15,7 @@ function filterItems(item, filter) {
|
||||
);
|
||||
}
|
||||
|
||||
function Item({ item, toggleFunction, type, onCollection, hideCurator }) {
|
||||
function Item({ item, toggleFunction, type, onCollection, isCurator }) {
|
||||
return (
|
||||
<div className="item" onClick={() => toggleFunction(item)} key={item.name}>
|
||||
<img
|
||||
@@ -41,7 +41,7 @@ function Item({ item, toggleFunction, type, onCollection, hideCurator }) {
|
||||
/>
|
||||
<div className="card-details">
|
||||
<span className="card-title">{item.display_name || item.name}</span>
|
||||
{!hideCurator ? (
|
||||
{!isCurator ? (
|
||||
<span className="card-subtitle">
|
||||
{variables.getMessage('modals.main.marketplace.by', { author: item.author })}
|
||||
</span>
|
||||
@@ -60,7 +60,7 @@ function Item({ item, toggleFunction, type, onCollection, hideCurator }) {
|
||||
}
|
||||
|
||||
function Items({
|
||||
hideCurator,
|
||||
isCurator,
|
||||
type,
|
||||
items,
|
||||
collection,
|
||||
@@ -115,7 +115,7 @@ function Items({
|
||||
?.filter((item) => filterItems(item, filter))
|
||||
.map((item) => (
|
||||
<Item
|
||||
hideCurator={hideCurator}
|
||||
isCurator={isCurator}
|
||||
item={item}
|
||||
toggleFunction={toggleFunction}
|
||||
type={type}
|
||||
@@ -124,7 +124,7 @@ function Items({
|
||||
))}
|
||||
</div>
|
||||
<div className="loader"></div>
|
||||
{!onCollection ? (
|
||||
{!onCollection && !isCurator ? (
|
||||
<div className="createYourOwn">
|
||||
<MdAutoFixHigh />
|
||||
<span className="title">{variables.getMessage('modals.main.marketplace.cant_find')}</span>
|
||||
|
||||
Reference in New Issue
Block a user