From ec2d864c4f5a7574be537a01a00164b5695ae2a1 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 12 Apr 2022 12:34:07 -0400 Subject: [PATCH] Adding a LEMMY_UI_DEBUG flag for eruda debugging --- src/server/index.tsx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/server/index.tsx b/src/server/index.tsx index 7b837605..b6db4981 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -171,6 +171,14 @@ server.get("/*", async (req, res) => { /> ); + const eruda = ( + <> + + + + ); + const erudaStr = process.env["LEMMY_UI_DEBUG"] ? renderToString(eruda) : ""; + const root = renderToString(wrapper); const symbols = renderToString(SYMBOLS); const cspStr = process.env.LEMMY_EXTERNAL_HOST @@ -187,10 +195,8 @@ server.get("/*", async (req, res) => { - + + ${erudaStr} ${helmet.title.toString()} ${helmet.meta.toString()}