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';
export default class extends React.Component {
static displayName = 'Footer'
static displayName = 'Footer';
renderLinks(mobile) {
return links.map(link => {
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;
}

View File

@ -189,7 +189,8 @@ module.exports = function(app) {
// to show all date related components
// using signed-in account's timezone
// 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
.progressTimestamps
@ -236,11 +237,12 @@ module.exports = function(app) {
.map(challenge => {
challenge = { ...challenge };
if (challenge.completedDate) {
challenge.completedDate =
moment.tz(challenge.completedDate, timezone).format(dateFormat);
challenge.completedDate =
moment.tz(challenge.completedDate, timezone)
.format(dateFormat);
}
if (challenge.lastUpdated) {
challenge.lastUpdated =
challenge.lastUpdated =
moment.tz(challenge.lastUpdated, timezone).format(dateFormat);
}
return challenge;