Added version text and adding loading for creating and logging in users
This commit is contained in:
13
src/App.jsx
13
src/App.jsx
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user