Skip to content

Commit 233b0f2

Browse files
committed
reformat fakeData for activity
1 parent cae51a2 commit 233b0f2

File tree

1 file changed

+35
-35
lines changed

1 file changed

+35
-35
lines changed

src/activity/fakeData.js

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,48 @@ import { faker } from "@faker-js/faker";
33
const eventsMap = [];
44

55
for (let i = 1; i <= 20; i += 1) {
6-
const title = faker.company.catchPhrase();
7-
const description = faker.lorem.paragraph(3);
8-
const location = faker.address.buildingNumber();
9-
const image = faker.image.nature(640, 480, true);
10-
11-
const dateTime = faker.date.recent(30);
12-
const date = dateTime.toLocaleDateString();
13-
const time = dateTime.toLocaleTimeString();
14-
15-
eventsMap.push({
16-
id: i,
17-
title,
18-
description,
19-
date,
20-
time,
21-
location,
22-
image,
23-
});
6+
const title = faker.company.catchPhrase();
7+
const description = faker.lorem.paragraph(3);
8+
const location = faker.address.buildingNumber();
9+
const image = faker.image.nature(640, 480, true);
10+
11+
const dateTime = faker.date.recent(30);
12+
const date = dateTime.toLocaleDateString();
13+
const time = dateTime.toLocaleTimeString();
14+
15+
eventsMap.push({
16+
id: i,
17+
title,
18+
description,
19+
date,
20+
time,
21+
location,
22+
image,
23+
});
2424
}
2525

2626
const projectsMap = [];
2727

2828
const statusList = ["Completed", "Ongoing"];
2929

3030
for (let i = 1; i <= 10; i += 1) {
31-
const title = `Project #${i}`;
32-
const description = faker.lorem.paragraph(2);
33-
const status = statusList[Math.floor(Math.random() * 2)];
34-
const startDate = faker.date.past(1).toLocaleDateString();
35-
const endDate = faker.date.soon(10).toLocaleDateString();
36-
37-
projectsMap.push({
38-
id: i,
39-
title,
40-
description,
41-
status,
42-
startDate,
43-
endDate,
44-
discordUrl: "https://discord.com/",
45-
gitUrl: "https://github.com/",
46-
projectUrl: "https://angular.io/",
47-
});
31+
const title = `Project #${i}`;
32+
const description = faker.lorem.paragraph(2);
33+
const status = statusList[Math.floor(Math.random() * 2)];
34+
const startDate = faker.date.past(1).toLocaleDateString();
35+
const endDate = faker.date.soon(10).toLocaleDateString();
36+
37+
projectsMap.push({
38+
id: i,
39+
title,
40+
description,
41+
status,
42+
startDate,
43+
endDate,
44+
discordUrl: "https://discord.com/",
45+
gitUrl: "https://github.com/",
46+
projectUrl: "https://angular.io/",
47+
});
4848
}
4949

5050
export { eventsMap, projectsMap };

0 commit comments

Comments
 (0)