From 91b24d227460a4586f934b512ee79ae80c75ff13 Mon Sep 17 00:00:00 2001 From: Abby Wheelis Date: Fri, 8 Sep 2023 19:50:45 -0600 Subject: [PATCH] only show copy button on ios --- www/js/control/PopOpCode.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/www/js/control/PopOpCode.jsx b/www/js/control/PopOpCode.jsx index 96b37b1ff..04a866f18 100644 --- a/www/js/control/PopOpCode.jsx +++ b/www/js/control/PopOpCode.jsx @@ -11,7 +11,6 @@ const PopOpCode = ({visibilityValue, tokenURL, action, setVis}) => { const opcodeList = tokenURL.split("="); const opcode = opcodeList[opcodeList.length - 1]; - const platform = window.cordova.platformId; const [copyAlertVis, setCopyAlertVis] = useState(false); @@ -20,7 +19,12 @@ const PopOpCode = ({visibilityValue, tokenURL, action, setVis}) => { setCopyAlertvis(true); }) } - + + let copyButton; + if (window.cordova.platformId == "ios"){ + copyButton = {copyText(opcode); setCopyAlertVis(true)}} style={styles.button}/> + } + return ( <> setVis(false)} @@ -36,7 +40,7 @@ const PopOpCode = ({visibilityValue, tokenURL, action, setVis}) => { action()} style={styles.button}/> - {} : () => {copyText(opcode); setCopyAlertVis(true)}} style={styles.button}/> + {copyButton}