From c63b4943df4f966d7bb3a4f04281cfa9faed22a3 Mon Sep 17 00:00:00 2001 From: Phillip Jensen <33448819+cryptobench@users.noreply.github.com> Date: Tue, 19 Sep 2023 08:33:49 +0200 Subject: [PATCH 1/3] Rework if statement --- src/components/Layout.jsx | 89 +++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 46 deletions(-) diff --git a/src/components/Layout.jsx b/src/components/Layout.jsx index 4aa96de7a..fb32b0bb4 100644 --- a/src/components/Layout.jsx +++ b/src/components/Layout.jsx @@ -229,18 +229,17 @@ export function Layout({ {isHomePage && }
- {!isHomePage || - !is404Page || - (!is500Page && ( -
-
-
-
-
- -
+ {!isHomePage || !is404Page || !is500Page ? ( +
+
+
+
+
+
- ))} +
+ ) : null} +
@@ -259,41 +258,39 @@ export function Layout({ {children}
- {!isHomePage || - !is404Page || - (!is500Page && ( -
- -
- ))} + {!isHomePage || !is404Page || !is500Page ? ( +
+ +
+ ) : null}