Skip to content

Commit 39f56dc

Browse files
fix(universalLogin): create a local copy of flag before signout clears it (#6145)
* fix(universalLogin): create a local copy of flag before signout clears it * fix: cohesive one useEffect hook
1 parent 74b2910 commit 39f56dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Logout.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ const Logout: FC = () => {
2222
const dispatch = useDispatch()
2323

2424
useEffect(() => {
25+
const universalLoginFlagValue = isFlagEnabled('universalLogin') ?? false
2526
const handleSignOut = async () => {
2627
if (CLOUD) {
27-
if (isFlagEnabled('universalLogin')) {
28+
console.warn('universalLoginFlagValue: ', universalLoginFlagValue)
29+
if (universalLoginFlagValue) {
2830
fetch('/api/env/quartz-login-url')
2931
.then(async response => {
3032
const quartzUrl = await response.text()

0 commit comments

Comments
 (0)