()
| 56 | * Signs into an `Anonymous` user with which to post restaurants and comments. |
| 57 | */ |
| 58 | const signInWithAnonCredentials = async () => { |
| 59 | try { |
| 60 | await signInWithEmailAndPassword( |
| 61 | auth, |
| 62 | 'Anonymous@Anonymous.com', |
| 63 | 'AnonymousPassword' |
| 64 | ); |
| 65 | } catch (userNotCreatedError) { |
| 66 | await createUserWithEmailAndPassword( |
| 67 | auth, |
| 68 | 'Anonymous@Anonymous.com', |
| 69 | 'AnonymousPassword' |
| 70 | ); |
| 71 | } |
| 72 | }; |
| 73 | |
| 74 | /** |
| 75 | * Adds a single mock restaurant, and an associated rating, to the Firestore |