MCPcopy Create free account
hub / github.com/firebase/codelab-friendlychat-web / checkSignedInWithMessage

Function checkSignedInWithMessage

web/src/index.js:263–276  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

261
262 // Returns true if user is signed-in. Otherwise false and displays a message.
263 function checkSignedInWithMessage() {
264 // Return true if the user is signed in Firebase
265 if (isUserSignedIn()) {
266 return true;
267 }
268
269 // Display a message to the user using a Toast.
270 var data = {
271 message: 'You must sign-in first',
272 timeout: 2000
273 };
274 signInSnackbarElement.MaterialSnackbar.showSnackbar(data);
275 return false;
276 }
277
278 // Resets the given MaterialTextField.
279 function resetMaterialTextfield(element) {

Callers 2

onMediaFileSelectedFunction · 0.70
onMessageFormSubmitFunction · 0.70

Calls 1

isUserSignedInFunction · 0.70

Tested by

no test coverage detected