Skip to content

Commit

Permalink
fix(hosted-session): set session completed boolean when session statu…
Browse files Browse the repository at this point in the history
…s changes
  • Loading branch information
mohsinht committed Aug 27, 2024
1 parent 731e39b commit 48f6578
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hooks/useHostedSession/useHostedSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,13 @@ export const useHostedSession = (): UseHostedSessionHook => {
hostedSession,
branding: data?.hostedSession.branding,
})

if (
hostedSession.status === HostedSessionStatus.Completed ||
hostedSession.status === HostedSessionStatus.Expired
) {
setIsSessionCompleted(true)
}
}
}, [data])

Expand Down

0 comments on commit 48f6578

Please sign in to comment.