From c3dc389f1a2292e050cb925a3d7eb3622017de62 Mon Sep 17 00:00:00 2001 From: Joseph Izang Date: Thu, 6 Jun 2024 14:05:52 +0100 Subject: [PATCH] cater to compiler version for old ones --- .../src/lib/components/universalDappUI.tsx | 52 +++++++++++++------ 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx b/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx index 88288665e7..3051a92b21 100644 --- a/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx +++ b/libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx @@ -28,14 +28,41 @@ export function UniversalDappUI(props: UdappProps) { const [evmBC, setEvmBC] = useState(null) const [instanceBalance, setInstanceBalance] = useState(0) - const getVersion = () => { - let version = '' - try { - version = window.location.href.split('=')[5].split('+')[0].split('-')[1] - } catch { - version = window.location.href.split('=')[5].split('+')[0].split('-')[1] + const UrlLink = () => { + + const getVersion = () => { + let version = '' + try { + version = window.location.href.split('=')[5].split('+')[0].split('-')[1] + } catch { + version = window.location.href.split('=')[5].split('+')[0].split('-')[1] + } + return version } - return version + + return ( +
+
+ +
+ } + > + { + parseFloat(getVersion()) < 0.6 ? ( + + + + ) : + + + } + +
+ ) } useEffect(() => { if (!props.instance.abi) { @@ -472,16 +499,7 @@ export function UniversalDappUI(props: UdappProps) { })}
-
-
- -
- }> - - - - -
+