From 85ca2685e57b2100bc3d41526e69543f29af741f Mon Sep 17 00:00:00 2001 From: heheer <71265218+newfish-cmyk@users.noreply.github.com> Date: Mon, 17 Jul 2023 16:21:45 +0800 Subject: [PATCH] fix(web): fix display issue when username does not exist (#1411) --- .../Mods/TemplateInfo/index.tsx | 48 ++++++++++--------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/web/src/pages/functionTemplate/Mods/TemplateInfo/index.tsx b/web/src/pages/functionTemplate/Mods/TemplateInfo/index.tsx index aaf2c6a791..5698b306da 100644 --- a/web/src/pages/functionTemplate/Mods/TemplateInfo/index.tsx +++ b/web/src/pages/functionTemplate/Mods/TemplateInfo/index.tsx @@ -22,31 +22,33 @@ const TemplateInfo = (props: { functionTemplate: TFunctionTemplate; usedBy: any[
- - {t("Template.DeveloperInfo")} - - -
- - {functionTemplate.user.username} - - - - - - + {functionTemplate.user?.username && ( + + {t("Template.DeveloperInfo")} + + +
+ + {functionTemplate.user?.username} - -
+ + + + + + + +
+
- + )} {t("Template.Function")}