Skip to content

Commit

Permalink
fix(navigation): wrap switchToArena in .change()
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 2d00d74566896199be6c881107bc780133860fc0
  • Loading branch information
IcaroG authored and actions-user committed Nov 12, 2024
1 parent caebc26 commit 86a0edb
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,12 @@ export function NavigationArenaRow({
height: isPage ? PAGE_HEIGHT : ROW_HEIGHT,
paddingLeft: indentMultiplier * 16 + 12,
}}
onClick={() => {
onClick={async () => {
onClose();
studioCtx.switchToArena(arena);
await studioCtx.change(({ success }) => {
studioCtx.switchToArena(arena);
return success();
});
}}
icon={<Icon icon={getArenaIcon(arena)} />}
isSelected={studioCtx.currentArena === arena}
Expand Down

0 comments on commit 86a0edb

Please sign in to comment.