Added version text and adding loading for creating and logging in users

This commit is contained in:
Karmaa
2025-03-17 23:00:07 -05:00
parent b493d9f993
commit d71352045c
4 changed files with 121 additions and 18 deletions

View File

@@ -379,9 +379,18 @@ function App() {
}
};
const handleGuestLogin = () => {
const handleGuestLogin = async ({ onSuccess, onFailure }) => {
if (userRef.current) {
userRef.current.loginAsGuest();
try {
await userRef.current.loginAsGuest();
setIsLoginUserHidden(true);
setIsLoggingIn(false);
if (onSuccess) onSuccess();
} catch (error) {
setIsLoginUserHidden(false);
setIsLoggingIn(false);
if (onFailure) onFailure(error);
}
}
}