From 8595b0a04a67443defd93d13d91d5571b9433868 Mon Sep 17 00:00:00 2001 From: Abhinav Date: Sat, 26 Feb 2022 12:36:35 +0530 Subject: [PATCH] fix passwordJWTToken ref usage --- src/pages/shared-albums/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/shared-albums/index.tsx b/src/pages/shared-albums/index.tsx index b198e0cee..57e85ad80 100644 --- a/src/pages/shared-albums/index.tsx +++ b/src/pages/shared-albums/index.tsx @@ -153,7 +153,7 @@ export default function PublicCollectionGallery() { // check if we need to prompt user for the password if ( (collection?.publicURLs?.[0]?.passwordEnabled ?? false) && - !passwordJWTToken + !passwordJWTToken.current ) { setIsPasswordProtected(true); } else { @@ -244,7 +244,7 @@ export default function PublicCollectionGallery() { if (errorMessage && !loading) { return {errorMessage}; } - if (isPasswordProtected && !passwordJWTToken && !loading) { + if (isPasswordProtected && !passwordJWTToken.current && !loading) { return (