js and now I am trying to copy my input value text to my clipboard. I write some code but it not working, please help me figure out and correct my code.
import InputBox from "./Input"
import ButtonBox from "./Button"
const EarlyAccessLimitation = () => {
let urlAddress = window.location;
function copyURLToClipboard() {
const UrlText = urlAddress;
UrlText.select();
alert.execCommand("copy");
}
return (
<div>
<InputBox url={urlAddress} />
<ButtonBox onClick={copyURLToClipboard}/>
</div>
);
};
export default EarlyAccessLimitation ;
It not show any error, but also it not copy the text.