From 18d9f06c14d4caf17c86c8e750ebd8b3096652c5 Mon Sep 17 00:00:00 2001 From: Quincy Larson Date: Fri, 1 May 2015 10:18:24 -0700 Subject: [PATCH] make / path redirect to landing in case of old account issue --- controllers/home.js | 10 +++------- views/home.jade | 7 +++++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/controllers/home.js b/controllers/home.js index 686cd2a80c..27768a51eb 100644 --- a/controllers/home.js +++ b/controllers/home.js @@ -4,11 +4,7 @@ */ exports.index = function(req, res) { - if (req.user) { - res.redirect('/map') - } else { - res.render('home', { - title: 'Learn to Code JavaScript and get a Coding Job by Helping Nonprofits' - }); - } + res.render('home', { + title: 'Learn to Code JavaScript and get a Coding Job by Helping Nonprofits' + }); }; diff --git a/views/home.jade b/views/home.jade index 335c1daffa..51e94bcc42 100644 --- a/views/home.jade +++ b/views/home.jade @@ -24,7 +24,10 @@ block content .big-break .row .col-xs-12.col-sm-8.col-sm-offset-2 - a.btn.btn-cta.signup-btn.btn-block(href="/login") Start learning to code (it's free) + if (user) + a.btn.btn-cta.signup-btn.btn-block(href="/challenges") Go to my next challenge + else + a.btn.btn-cta.signup-btn.btn-block(href="/login") Start learning to code (it's free) .spacer a.btn.btn-cta.btn-success.btn-block(href="/nonprofits") My nonprofit needs coding help .big-break @@ -82,7 +85,7 @@ block content li.ion-code   You'll work through our focused, interactive courses and tutorials li.ion-code   You'll learn to code at your own pace, in your browser or on your phone li.ion-code   You'll become qualified for thousands of jobs currently going unfilled - li.ion-code   You can get help in real time from our community chat rooms and forum + li.ion-code   You can get help in real time from our community chat rooms li.ion-code   We all share one common goal: to boost our careers with code .big-break .row