I want to show a button with 2 states (APRROVE USDC) and (CONFIRM SWAP). But, I do not how to get from the ERC20.sol contract a variable o methods that returns if the token was already approved or not.
You can use the allowance method to check if the spender is approved to transfer tokens on behalf of the owner. the method will return you the approved amount to spend
allowance(address owner, address spender) → uint256 external Returns the remaining number of tokens that spender will be allowed to spend on behalf of owner through transferFrom. This is zero by default.
This value changes when approve or transferFrom are called.