Skip to content

Commit

Permalink
fix: prevent navigation if already at local stage (#10575)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Krick <[email protected]>
  • Loading branch information
mattkrick authored Dec 10, 2024
1 parent 4a1f511 commit 1478bd2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/client/hooks/useGotoStageId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ const useGotoStageId = (meetingRef: useGotoStageId_meeting$key) => {
isNavigableByFacilitator
}
}
localStage {
id
}
}
`,
meetingRef
Expand All @@ -43,9 +46,11 @@ const useGotoStageId = (meetingRef: useGotoStageId_meeting$key) => {
facilitatorStageId,
facilitatorUserId,
id: meetingId,
phases
phases,
localStage
} = meeting
const {viewerId} = atmosphere
if (localStage?.id === stageId) return
const isViewerFacilitator = viewerId === facilitatorUserId
const res = findStageById(phases, stageId)
if (!res) return
Expand Down

0 comments on commit 1478bd2

Please sign in to comment.