pull/4841/head
Joseph Izang 6 months ago
parent ce70beb1ab
commit 840af9562b
  1. 12
      libs/remix-ui/run-tab/src/lib/components/universalDappUI.tsx

@ -37,9 +37,9 @@ export function UniversalDappUI(props: UdappProps) {
} catch { } catch {
version = window.location.href.split('=')[5].split('+')[0].split('-')[1] version = window.location.href.split('=')[5].split('+')[0].split('-')[1]
} }
return version return [version, parseFloat(version.slice(1))]
} }
console.log('getVersion', getVersion()[1])
return ( return (
<div className="d-flex flex-row justify-content-between mt-2"> <div className="d-flex flex-row justify-content-between mt-2">
<div className="py-2 border-top d-flex justify-content-start flex-grow-1"> <div className="py-2 border-top d-flex justify-content-start flex-grow-1">
@ -51,12 +51,12 @@ export function UniversalDappUI(props: UdappProps) {
tooltipId="receiveEthDocstoolTip" tooltipId="receiveEthDocstoolTip"
tooltipText={<FormattedMessage id="udapp.tooltipText8" />} tooltipText={<FormattedMessage id="udapp.tooltipText8" />}
> >
{ { // receive method added to solidity v0.6.x. use this as diff.
parseFloat(getVersion()) < 0.6 ? ( (getVersion()[1] as number) < 0.6 ? (
<a href={`https://solidity.readthedocs.io/en/${getVersion()}/contracts.html`} target="_blank" rel="noreferrer"> <a href={`https://solidity.readthedocs.io/en/${getVersion()[0]}/contracts.html`} target="_blank" rel="noreferrer">
<i aria-hidden="true" className="fas fa-info my-2 mr-1"></i> <i aria-hidden="true" className="fas fa-info my-2 mr-1"></i>
</a> </a>
) :<a href={`https://solidity.readthedocs.io/en/${getVersion()}/contracts.html#receive-ether-function`} target="_blank" rel="noreferrer"> ) :<a href={`https://solidity.readthedocs.io/en/${getVersion()[0]}/contracts.html#receive-ether-function`} target="_blank" rel="noreferrer">
<i aria-hidden="true" className="fas fa-info my-2 mr-1"></i> <i aria-hidden="true" className="fas fa-info my-2 mr-1"></i>
</a> </a>
} }

Loading…
Cancel
Save