Connecting to goerli network using Wagmi useConnect hooks

How can I connect to the goerli test network using the wagmi useConnect hooks and the metamask connector?
const { connect } = useConnect({

connector: new MetaMaskConnector(),

chainId: goerli.id,

})

This is how I am trying it, and how will I know that I have connected to the goerli network?

I think that you can get the value of current chan id and check it to see if it has the expected value

Thank you, I was able to see that I connected to the goerli network, do you also know how to send a transaction to a test network using 1inch swap api?

I don’t know the steps to do that

maybe this video helps:

I don’t know if 1Inch works on testnets

Ok thank you for the help