From afe4b31854d0022f2444c485b677f9b664245d96 Mon Sep 17 00:00:00 2001 From: Swapnil Mishra Date: Wed, 25 Jan 2017 15:29:10 +0530 Subject: [PATCH] Adding condition for link configs so that whichever is not present will not render --- components/SiteLinks/index.jsx | 80 +++++++++++++++++++++------------- 1 file changed, 50 insertions(+), 30 deletions(-) diff --git a/components/SiteLinks/index.jsx b/components/SiteLinks/index.jsx index e4176e1..3bd5b31 100644 --- a/components/SiteLinks/index.jsx +++ b/components/SiteLinks/index.jsx @@ -6,37 +6,57 @@ import './style.css' import '../../static/fonts/fontawesome/style.css' class SiteLinks extends React.Component { - render() { + render () { - return ( -
- - - -
- ); - } + return ( +
+ +
    + {config.siteEmailUrl && ( +
  • + + + +
  • + )} + {config.siteTelegramUrl && ( +
  • + + + +
  • + )} +
+
    + {config.siteRssUrl && ( +
  • + +
  • + )} +
+
+ ) + } } export default SiteLinks \ No newline at end of file