Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calling game.finish() with an announcement causes an error #38

Open
rizen opened this issue Mar 7, 2024 · 1 comment
Open

calling game.finish() with an announcement causes an error #38

rizen opened this issue Mar 7, 2024 · 1 comment

Comments

@rizen
Copy link

rizen commented Mar 7, 2024

I can call game.finish() or game.finish(player) but if I call game.finish(player, 'foo') then the app crashes with this stack trace:

Screenshot 2024-03-07 at 4 31 38 PM
@fevrisn
Copy link

fevrisn commented Jul 28, 2024

The string argument is not a string to be displayed to the users, but the identifier for the render, you need to implement this in ui/index.tsx:

render(setup, {
  // ... you will have a bunch of stuff here
  
  announcements: {
    foo: game => {
      return (
        <>
          <h1>Bar</h1>
        </>
      );
    }
  },
});

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

No branches or pull requests

2 participants