Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@bal7hazar
Copy link

@bal7hazar bal7hazar commented Nov 12, 2024

To open the achievement page in your client, you just need to trigger this callback in a button where you want:

const handleTrophyClick = useCallback(() => {
  if (!connector?.controller) {
    console.error("Connector not initialized");
    return;
  }
  connector.controller.openProfile("achievements" as any); // Should be fixed with the c@cartridge/controller 0.5.0-alpha.9
}, [connector]);

Note: you can retrieve connector in the useAccount hook

const { connector } = useAccount();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant