Skip to content

Commit

Permalink
don't display cards with clix = 1 differently
Browse files Browse the repository at this point in the history
 - need a long-term solution to tracking "new" promises and or pageviews
  • Loading branch information
chrisbutler committed Oct 12, 2019
1 parent 4309778 commit 88be1db
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
2 changes: 1 addition & 1 deletion client/src/components/card/index.tsx
Expand Up @@ -75,7 +75,7 @@ const Card: React.SFC<ICardProps> = ({
user: { counted = 0, pending = 0, score = 0, username = '' } = {},
withHeader,
}) => (
<CardWrapper className={cardClassesFor({ tfin, clix })} credit={clix === 1 ? -1 : credit}>
<CardWrapper className={cardClassesFor({ tfin, clix })} credit={credit}>
{ withHeader &&
<CardHeader counted={counted} pending={pending} score={score} username={username} />
}
Expand Down
3 changes: 1 addition & 2 deletions lib/helpers/calculate.ts
Expand Up @@ -2,7 +2,6 @@ import _ from 'lodash';

// import { timeDiff } from 'lib/parse/time';

// import { isNewPromise } from 'server/models/promise';
const isNewPromise = ({ clix }) => clix === 1; // FIXME

// export const dueStatus = (dueDate) => {
Expand All @@ -25,6 +24,6 @@ export const cardClassesFor = ({ tfin, clix, voided = false }) => {
voided,
};

// console.log('cardClassesFor', promise, classes);
// console.log('cardClassesFor', clix, classes);
return _(classes).pickBy().keys().value().join(' ');
};
3 changes: 0 additions & 3 deletions lib/helpers/colors.ts
Expand Up @@ -6,9 +6,6 @@ const colorFromPercent = (score) => {
switch (true) {
case (score == null):
break;
case (score === -1):
color = 'whiteGray';
break;
case (score < 0.5):
color = 'red';
break;
Expand Down
2 changes: 0 additions & 2 deletions models/db/promise.ts
Expand Up @@ -4,8 +4,6 @@ import moment from 'moment';
import parseCredit from 'lib/parse/credit';
import { sequelize, Sequelize } from 'server/db/sequelize';

export const isNewPromise = ({ promise }) => promise.clix === 1;

/* eslint-disable max-len */
export default sequelize.define('promises', {
bmid: { // the id of the Beeminder datapoint for this promise
Expand Down

0 comments on commit 88be1db

Please sign in to comment.