Skip to content

Commit 8746c23

Browse files
committed
[functions] Fix loading flag
1 parent 390fa34 commit 8746c23

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

auth/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ const UpdateEmail = () => {
499499
/>
500500
<button
501501
onClick={async () => {
502-
updateEmail(email);
502+
await updateEmail(email);
503503
alert('Updated email address');
504504
}}
505505
>
@@ -556,7 +556,7 @@ const UpdatePassword = () => {
556556
/>
557557
<button
558558
onClick={async () => {
559-
updatePassword(email);
559+
await updatePassword(email);
560560
alert('Updated password');
561561
}}
562562
>
@@ -619,7 +619,7 @@ const UpdateProfile = () => {
619619
/>
620620
<button
621621
onClick={async () => {
622-
updateProfile({ displayName, photoURL });
622+
await updateProfile({ displayName, photoURL });
623623
alert('Updated profile');
624624
}}
625625
>
@@ -680,7 +680,7 @@ const SendPasswordReset = () => {
680680
/>
681681
<button
682682
onClick={async () => {
683-
sendPasswordResetEmail(email);
683+
await sendPasswordResetEmail(email);
684684
alert('Sent email');
685685
}}
686686
>
@@ -734,7 +734,7 @@ const SendEmailVerification = () => {
734734
<div className="App">
735735
<button
736736
onClick={async () => {
737-
sendEmailVerification();
737+
await sendEmailVerification();
738738
alert('Sent email');
739739
}}
740740
>

functions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const HttpsCallable = () => {
5252
{executing && <span>Function executing...</span>}
5353
<button
5454
onClick={async () => {
55-
executeCallable();
55+
await executeCallable();
5656
alert('Executed function');
5757
}}
5858
>

functions/useHttpsCallable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default <RequestData = unknown, ResponseData = unknown>(
2424
const callable = httpsCallable<RequestData, ResponseData>(functions, name);
2525
setLoading(true);
2626
try {
27-
return callable(data);
27+
return await callable(data);
2828
} catch (err) {
2929
setError(err as Error);
3030
} finally {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-firebase-hooks",
3-
"version": "5.0.0-alpha.4",
3+
"version": "5.0.0-alpha.5",
44
"description": "React Hooks for Firebase",
55
"author": "CS Frequency Limited (https://csfrequency.com)",
66
"license": "Apache-2.0",

0 commit comments

Comments
 (0)