Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
rasmuserik committed Oct 11, 2018
1 parent 99502bc commit fb85241
Showing 1 changed file with 61 additions and 59 deletions.
120 changes: 61 additions & 59 deletions src/quizData.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
export const dispatchScreenData = ({_id, parent, action}) => ({
_id,
parent,
ui: [
{
type: 'media',
image: ''
},

{type: 'text', text: 'Feedback tekst'},
{
type: 'button',
colort: 'primary',
text: 'Prøv igen',
action
}
],
log: true
});

export const dispatchActionData = ({screen}) => ({
condition: {atLeast: {score: 10}},
action: {
screen,
set: {trophy: {image: ''}},
callback: true
}
});

export const answerScreenData = ({_id, parent, action}) => ({
_id,
parent,
ui: [
{
type: 'media',
image: ''
},
{
type: 'text',
text: 'Forklaring af resultatet'
},
{
type: 'button',
color: 'primary',
text: 'videre',
action
}
],
log: true
});

export const answerButtonData = ({nextScreen}) => ({
type: 'button',
color: 'primary',
text: 'Tekst på svarknap',
action: {
screen: nextScreen,
increment: {score: 0, correct: 0, questionCount: 1}
}
});

export const quizData = () => ({
_type: 'quiz',
_id: 'quizId',
Expand Down Expand Up @@ -287,62 +348,3 @@ export const quizData = () => ({
}
}
});
export const dispatchScreenData = ({_id, parent, action}) => ({
_id,
parent,
ui: [
{
type: 'media',
image: ''
},

{type: 'text', text: 'Feedback tekst'},
{
type: 'button',
colort: 'primary',
text: 'Prøv igen',
action
}
],
log: true
});

export const dispatchActionData = ({screen}) => ({
condition: {atLeast: {score: 10}},
action: {
screen,
set: {trophy: {image: ''}},
callback: true
}
});

export const answerScreenData = ({_id, parent, action}) => ({
_id,
parent,
ui: [
{
type: 'media',
image: ''
},
{
type: 'text',
text: 'Forklaring af resultatet'
},
{
type: 'button',
color: 'primary',
text: 'videre',
action
}
],
log: true
});
export const answerButtonData = ({nextScreen}) => ({
type: 'button',
color: 'primary',
text: 'Tekst på svarknap',
action: {
screen: nextScreen,
increment: {score: 0, correct: 0, questionCount: 1}
}
});

0 comments on commit fb85241

Please sign in to comment.