diff --git a/src/pages/ScriptList/index.tsx b/src/pages/ScriptList/index.tsx index 6e06be2b8..c66418783 100644 --- a/src/pages/ScriptList/index.tsx +++ b/src/pages/ScriptList/index.tsx @@ -210,6 +210,7 @@ const ScriptList: FC = () => {
{[...scripts].map(([label, meta]) => { const script = scriptDataList.find(s => s.tag === label) + if (!script) return null return (
@@ -226,22 +227,19 @@ const ScriptList: FC = () => { ) : null, )} - {script ? ( - - {t('script_list.link.detail')} - - ) : null} + + {t('script_list.link.detail')} +
- {script ? ( - <> -

{`${t(`script_list.on_chain_data`)}:`}

- {script.codeHashes.map((codeHash: string, idx: number) => ( -
-                        {`{
+                <>
+                  

{`${t(`script_list.on_chain_data`)}:`}

+ {script.codeHashes.map((codeHash: string, idx: number) => ( +
+                      {`{
   "code_hash": "${codeHash}",
   "hash_type": "${script.hashType}",
   "out_point": {
@@ -250,10 +248,9 @@ const ScriptList: FC = () => {
   },
   "dep_type": "${script.depType}"
 }`}
-                      
- ))} - - ) : null} +
+ ))} + )