From d7fa02435fd58755184ca0849379e27941e6f244 Mon Sep 17 00:00:00 2001 From: mrfry Date: Wed, 21 Apr 2021 15:51:18 +0200 Subject: [PATCH] not showing motd if its empty --- src/pages/index.js | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/src/pages/index.js b/src/pages/index.js index 955b96e..9f74abd 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -286,19 +286,23 @@ export default function Index({ globalData }) { } const renderMotd = () => { - return ( -
-
MOTD
- {motd ? ( -
- ) : ( -
...
- )} -
- ) + if (motd) { + return ( +
+
MOTD
+ {motd ? ( +
+ ) : ( +
...
+ )} +
+ ) + } else { + return null + } } return (