mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-18 04:21:12 +02:00
fix conditional rendering
This commit is contained in:
@@ -228,8 +228,9 @@ export default class SavedItemPane extends Component {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<div id="js-saved-items-wrap" class="saved-items-pane__container">
|
<div id="js-saved-items-wrap" class="saved-items-pane__container">
|
||||||
{!this.state.filteredItems.length &&
|
{!this.state.filteredItems.length && this.items.length ? (
|
||||||
this.items.length && <div class="mt-1">No match found.</div>}
|
<div class="mt-1">No match found.</div>
|
||||||
|
) : null}
|
||||||
{this.state.filteredItems.map(item => (
|
{this.state.filteredItems.map(item => (
|
||||||
<div
|
<div
|
||||||
class="js-saved-item-tile saved-item-tile"
|
class="js-saved-item-tile saved-item-tile"
|
||||||
@@ -258,9 +259,9 @@ export default class SavedItemPane extends Component {
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
{!this.items.length && (
|
{!this.items.length ? (
|
||||||
<h2 class="opacity--30">Nothing saved here.</h2>
|
<h2 class="opacity--30">Nothing saved here.</h2>
|
||||||
)}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@@ -109,6 +109,14 @@ p {
|
|||||||
margin-bottom: 2rem;
|
margin-bottom: 2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mt-1 {
|
||||||
|
margin-top: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mt-2 {
|
||||||
|
margin-top: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
.mb-0 {
|
.mb-0 {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user