-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathuseGeneratedCards.js
61 lines (59 loc) · 2.02 KB
/
useGeneratedCards.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
57
58
59
60
61
export default function useGeneratedCards() {
const Cards = [
{
question:
'Wealthy lookning young man asks you to throw a party in your kingdom.',
leftText: 'Deny the offer',
onLeft: {happy: [], sad: ['joker']},
rightText: 'Lets party!',
onRight: {happy: ['joker'], sad: []},
image: 'https://image.flaticon.com/icons/png/512/3479/3479910.png',
background: '#ccc',
},
{
question:
'Hunter from the near village requests some help. It seems like his hometown is in danger',
leftText: 'Let him fight alone',
onLeft: {happy: [], sad: ['woman']},
rightText: 'Send the troops',
onRight: {happy: ['knight'], sad: []},
image: 'https://image.flaticon.com/icons/png/512/3483/3483016.png',
background: '#ccc',
},
{
question: 'Your dauger wants a new pet.',
leftText: 'Get her a cat',
onLeft: {happy: ['woman'], sad: []},
rightText: 'Get her a lion',
onRight: {happy: ['joker'], sad: ['woman']},
image: 'https://image.flaticon.com/icons/png/512/3479/3479874.png',
background: '#ccc',
},
{
question:
'Knights are bored because there is no war so they start to rob nearby villages',
leftText: 'Punish the knights',
onLeft: {happy: ['woman'], sad: ['knight']},
rightText: 'Ask them to bring you something nice',
onRight: {happy: ['joker', 'knight'], sad: ['woman']},
image: 'https://image.flaticon.com/icons/png/512/3479/3479972.png',
background: '#ccc',
},
{
question: 'Some overseas youngster seems to be a great warrior.',
leftText: 'He is probably a spy. Kill him',
onLeft: {happy: [], sad: ['woman']},
rightText: 'Put him in the army ',
onRight: {happy: ['knight'], sad: ['joker']},
image: 'https://image.flaticon.com/icons/png/512/3480/3480000.png',
background: '#ccc',
},
];
const getCardByIndex = (index) => {
return Cards[index % 5];
};
return {
Cards,
getCardByIndex,
};
}