diff --git a/src/zilker/CardSection.js b/src/zilker/CardSection.js index 3646f0d..bc4f9d1 100644 --- a/src/zilker/CardSection.js +++ b/src/zilker/CardSection.js @@ -1,6 +1,7 @@ import React, { Component } from 'react'; import _ from 'lodash'; +import EmptySearchResults from "../zilker/EmptySearchResults"; import GoalCardsGroup from "../zilker/GoalCardsGroup" import ProjectCard from "../zilker/ProjectCard" @@ -10,12 +11,16 @@ class CardSection extends Component { render() { const { cards, type } = this.props + const foundProjects = type === 'project' && cards && !!cards.length; return (
{ - (type === "project") && cards.map((card) => { + !foundProjects && + } + { + foundProjects && cards.map((card) => { return }) } diff --git a/src/zilker/EmptySearchResults.js b/src/zilker/EmptySearchResults.js new file mode 100644 index 0000000..f1731e5 --- /dev/null +++ b/src/zilker/EmptySearchResults.js @@ -0,0 +1,22 @@ +import React, { Component } from 'react'; +import _ from 'lodash'; + +import Search from '../zilker/Search'; + +class EmptySearchResults extends Component { + + render() { + const { cards, type } = this.props + + return ( +
+
+ No Results Found. Try another search or explore current projects. +
+
+ ); + } + +} + +export default EmptySearchResults;