Skip to content
Permalink
Browse files

Show a loading screen while waiting to login.

chapter7-4
  • Loading branch information
tmeasday committed Oct 19, 2015
1 parent 10eac50 commit 700ecc42e640405e5d963daca1514a168c09a52d
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/router.js
@@ -16,7 +16,11 @@ Router.route('/submit', {name: 'postSubmit'});

var requireLogin = function() {
if (! Meteor.user()) {
this.render('accessDenied');
if (Meteor.loggingIn()) {
this.render(this.loadingTemplate);
} else {
this.render('accessDenied');
}
} else {
this.next();
}

4 comments on commit 700ecc4

@chengguozhen

This comment has been minimized.

Copy link

@chengguozhen chengguozhen replied Nov 18, 2015

good

@tete1230

This comment has been minimized.

Copy link

@tete1230 tete1230 replied Dec 21, 2015

very good

@asdimchik

This comment has been minimized.

Copy link

@asdimchik asdimchik replied Aug 17, 2016

very very good )

@ShineKidd

This comment has been minimized.

Copy link

@ShineKidd ShineKidd replied Jul 17, 2017

very very very good :) 👍

Please sign in to comment.
You can’t perform that action at this time.