Skip to content

Commit

Permalink
fix(activity): stringify date parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
akoushke authored and lalli-flores committed Sep 11, 2019
1 parent 8ef4ddf commit 4e3e8e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/WebexActivity/WebexActivity.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ stories.add('long text', () => {
});

stories.add('created today', () => {
const today = new Date();
const today = new Date().toString();

newActivities[activityID] = {...activities[activityID], text: `${today}`, created: today};

Expand All @@ -93,7 +93,7 @@ stories.add('created today', () => {
});

stories.add('created yesterday', () => {
const yesterday = subDays(new Date(), 1);
const yesterday = subDays(new Date(), 1).toString();

newActivities[activityID] = {
...activities[activityID],
Expand All @@ -114,7 +114,7 @@ stories.add('created yesterday', () => {

stories.add('created this week', () => {
// if it's sunday, make it a monday, otherwise pick the day before today
const thisWeek = getDay(new Date()) === 0 ? addDays(new Date(), 1) : subDays(new Date(), 2);
const thisWeek = getDay(new Date()) === 0 ? addDays(new Date(), 1) : subDays(new Date(), 2).toString();

newActivities[activityID] = {...activities[activityID], text: `${thisWeek}`, created: thisWeek};

Expand All @@ -130,7 +130,7 @@ stories.add('created this week', () => {
});

stories.add('created over a week ago', () => {
const oldDate = subDays(new Date(), 7);
const oldDate = subDays(new Date(), 7).toString();

newActivities[activityID] = {...activities[activityID], text: `${oldDate}`, created: oldDate};

Expand Down

0 comments on commit 4e3e8e0

Please sign in to comment.