-
Notifications
You must be signed in to change notification settings - Fork 0
/
mock-data.js
56 lines (45 loc) · 969 Bytes
/
mock-data.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
export const INITIAL_STATE = {
employeeId: '',
loggedInUser: null,
ideas: [],
sortByField: 'createdAt'
};
export const INITIAL_IDEA_STATE = () => ({
title: '',
description: '',
tags: []
});
export const INITIAL_UPVOTE_STATE = () => ({
upvotes: []
});
export const EMPLOYEE_ID = 'HI-JD101';
export const INVALID_EMPLOYEE_ID = '123';
export const IDEA_TITLE = 'JS Hackathon';
export const IDEA_DESCR = 'Apply your JS skills';
export const IDEA_CREATED_AT = '2021-10-02T17:05:49.623Z';
export const TAG_IDS = [1, 2];
export const LOGGED_IN_USER = { emp_id: EMPLOYEE_ID };
export const IDEAS = [{
id: '1',
title: IDEA_TITLE,
description: IDEA_DESCR,
tags: TAG_IDS,
createdBy: EMPLOYEE_ID
}, {
id: '2',
title: 'Idea 2',
description: 'description 2',
tags: [2, 4],
createdBy: EMPLOYEE_ID
}];
export const UPVOTES = [{
id: '1',
ideaId: '1',
userId: EMPLOYEE_ID
}, {
id: '2',
ideaId: '2'
}, {
id: '3',
ideaId: '2'
}]