@@ -2,6 +2,8 @@ import React from "react"
22
33import ReactMarkdown from "react-markdown"
44
5+ import { FiExternalLink } from "react-icons/fi"
6+
57import { Category , type DocsLink , type Instruction } from "@features/spec/tvm-specification.types"
68
79import { prettySubCategoryName } from "@app/pages/InstructionsPage/lib/formatCategory.ts"
@@ -90,7 +92,22 @@ const InstructionDetail: React.FC<InstructionDetailProps> = ({
9092 < div className = { styles . metadataContainer } >
9193 < div className = { styles . metadataItem } >
9294 < span className = { styles . metadataLabel } > Since Version:</ span >
93- < span className = { styles . metadataValue } > { version } </ span >
95+ < span className = { styles . metadataValue } >
96+ { version >= 4 ? (
97+ < a
98+ href = { `https://github.com/ton-blockchain/ton/blob/master/doc/GlobalVersions.md#version-${ version } ` }
99+ target = "_blank"
100+ rel = "noopener noreferrer"
101+ className = { styles . versionLink }
102+ title = { `View TVM version ${ version } documentation` }
103+ >
104+ { version }
105+ < FiExternalLink />
106+ </ a >
107+ ) : (
108+ version
109+ ) }
110+ </ span >
94111 </ div >
95112
96113 < div className = { styles . metadataItem } >
@@ -177,8 +194,12 @@ const InstructionDetail: React.FC<InstructionDetailProps> = ({
177194 < ReactMarkdown components = { markdownComponents } > { description . short } </ ReactMarkdown >
178195 ) }
179196
180- < h3 className = { styles . detailSectionTitle } > Details</ h3 >
181- < ReactMarkdown components = { markdownComponents } > { description . long } </ ReactMarkdown >
197+ { description . long && (
198+ < >
199+ < h3 className = { styles . detailSectionTitle } > Details</ h3 >
200+ < ReactMarkdown components = { markdownComponents } > { description . long } </ ReactMarkdown >
201+ </ >
202+ ) }
182203 </ div >
183204 </ div >
184205
0 commit comments