Fix lint errors

This commit is contained in:
Logan Tegman
2016-02-01 14:16:27 -08:00
parent fb83f96ea5
commit e2ac51f166
3 changed files with 8 additions and 6 deletions

View File

@ -4,7 +4,7 @@ import { Col, Row, Grid } from 'react-bootstrap';
import links from './links.json'; import links from './links.json';
export default class extends React.Component { export default class extends React.Component {
static displayName = 'Footer' static displayName = 'Footer';
renderLinks(mobile) { renderLinks(mobile) {
return links.map(link => { return links.map(link => {
return ( return (

View File

@ -525,7 +525,7 @@ module.exports = function(app) {
} }
); );
if (timezone && (!req.user.timezone || req.user.timezone != timezone)) { if (timezone && (!req.user.timezone || req.user.timezone !== timezone)) {
req.user.timezone = timezone; req.user.timezone = timezone;
} }

View File

@ -189,7 +189,8 @@ module.exports = function(app) {
// to show all date related components // to show all date related components
// using signed-in account's timezone // using signed-in account's timezone
// not of the profile she is viewing // not of the profile she is viewing
const timezone = req.user && req.user.timezone ? req.user.timezone : 'UTC'; const timezone = req.user &&
req.user.timezone ? req.user.timezone : 'UTC';
var cals = profileUser var cals = profileUser
.progressTimestamps .progressTimestamps
@ -236,11 +237,12 @@ module.exports = function(app) {
.map(challenge => { .map(challenge => {
challenge = { ...challenge }; challenge = { ...challenge };
if (challenge.completedDate) { if (challenge.completedDate) {
challenge.completedDate = challenge.completedDate =
moment.tz(challenge.completedDate, timezone).format(dateFormat); moment.tz(challenge.completedDate, timezone)
.format(dateFormat);
} }
if (challenge.lastUpdated) { if (challenge.lastUpdated) {
challenge.lastUpdated = challenge.lastUpdated =
moment.tz(challenge.lastUpdated, timezone).format(dateFormat); moment.tz(challenge.lastUpdated, timezone).format(dateFormat);
} }
return challenge; return challenge;