Display error message if there is no data inside the db
@@ -68,10 +68,20 @@ class Hashtag extends Widget {
}
render() {
+ if (this.state.hashTag.length === 0) {
+ return (
+ <h1 style={{textAlign: "center", color: "#EF5350"}}>For the processing of "Twitter Analytics" please
+ deploy the Siddhi app as per <a
+ href="https://github.com/wso2/product-sp/blob/master/modules/solutions/twitter-analytics/README.md"
+ style={{color: '#AB47BC', textDecoration: 'underline'}}>instruction</a>
+ </h1>
+ );
+ } else {
return (
<h1 style={{textAlign: "center"}}>{this.state.hashTag[0]}</h1>
);
}
}
+}
global.dashboard.registerWidget('Hashtag', Hashtag);
\ No newline at end of file
