Skip to content

[Bug]: Navigating to /game/:gameId as a non-player shows blank screen instead of redirecting to /spectate/:gameId #1319

@itsalaidbacklife

Description

@itsalaidbacklife

Bug Summary

If a user navigates to /game/:gameId for a game in which they aren't a player, they should be redirected to /spectate/:gameId but instead they see a blank screen

(e.g. go to https://www.cuttle.cards/game/46882)

Detailed Description

Players play in a game at the route /game/:gameId, and spectators watch at /spectate/:gameId. If a player shares their current link and a different user (not a player in the game) goes there, the non-player user should be neatly redirected to /spectate/:gameId instead of seeing a blank screen:

Image

Current Behavior

Navigating to /game/:gameId as a nonplayer user shows a blank screen

Expected Behavior

User is instead redirected to /spectate/gameId

Steps to Reproduce

  1. Join and start a game as users 1 and 2
  2. Navigate to /game/:gameId for the gameId of the above game as a third user (not in the game)
  3. Third users will now see blank screen

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfrontendRequires changes to the frontend (vue) clientversion-patchAn update that warrants a bumping the project's patch version (e.g. 4.0.0 => 4.0.1)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions