Skip to content

Commit 4e3e8e0

Browse files
akoushkelalli-flores
authored andcommitted
fix(activity): stringify date parameter
1 parent 8ef4ddf commit 4e3e8e0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/WebexActivity/WebexActivity.stories.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ stories.add('long text', () => {
7777
});
7878

7979
stories.add('created today', () => {
80-
const today = new Date();
80+
const today = new Date().toString();
8181

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

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

9595
stories.add('created yesterday', () => {
96-
const yesterday = subDays(new Date(), 1);
96+
const yesterday = subDays(new Date(), 1).toString();
9797

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

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

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

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

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

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

0 commit comments

Comments
 (0)