The page includes the following line in the code snippet:
const apiUrl = `/api/w3up-delegation/${client.agent().did()}`
But this code doesn't work because client.agent is not a function,
but the following code works fine:
const apiUrl = `/api/w3up-delegation/${client.agent.did()}`
I use the latest w3up-client@12.4.1 btw