Navigation part 2
This commit is contained in:
16
package-lock.json
generated
16
package-lock.json
generated
@@ -6242,6 +6242,14 @@
|
|||||||
"prop-types": "15.5.10"
|
"prop-types": "15.5.10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"react-native-deck-swiper": {
|
||||||
|
"version": "1.3.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-native-deck-swiper/-/react-native-deck-swiper-1.3.8.tgz",
|
||||||
|
"integrity": "sha1-U2LjDSksuFrrn/fJ3xvNst+vZGs=",
|
||||||
|
"requires": {
|
||||||
|
"prop-types": "15.5.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"react-native-dismiss-keyboard": {
|
"react-native-dismiss-keyboard": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/react-native-dismiss-keyboard/-/react-native-dismiss-keyboard-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-native-dismiss-keyboard/-/react-native-dismiss-keyboard-1.0.0.tgz",
|
||||||
@@ -6263,6 +6271,14 @@
|
|||||||
"react-native-drawer-layout": "1.3.2"
|
"react-native-drawer-layout": "1.3.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"react-native-progress": {
|
||||||
|
"version": "3.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/react-native-progress/-/react-native-progress-3.4.0.tgz",
|
||||||
|
"integrity": "sha512-Kqc+wwQHyBG83Fnbb84oM9qqgn1d51ABVS/RK36V+35KmihEYx33WijdQT05iwT+tfJWGArvFLsZWbd8mKyJ6A==",
|
||||||
|
"requires": {
|
||||||
|
"prop-types": "15.5.10"
|
||||||
|
}
|
||||||
|
},
|
||||||
"react-native-router-flux": {
|
"react-native-router-flux": {
|
||||||
"version": "4.0.0-beta.21",
|
"version": "4.0.0-beta.21",
|
||||||
"resolved": "https://registry.npmjs.org/react-native-router-flux/-/react-native-router-flux-4.0.0-beta.21.tgz",
|
"resolved": "https://registry.npmjs.org/react-native-router-flux/-/react-native-router-flux-4.0.0-beta.21.tgz",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
"react-native": "0.47.0",
|
"react-native": "0.47.0",
|
||||||
"react-native-deck-swiper": "^1.3.8",
|
"react-native-deck-swiper": "^1.3.8",
|
||||||
"react-native-progress": "^3.4.0",
|
"react-native-progress": "^3.4.0",
|
||||||
"react-native-router-flux": "^4.0.0-beta.21"
|
"react-native-router-flux": "^4.0.0-beta.21"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"babel-jest": "21.0.2",
|
"babel-jest": "21.0.2",
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { Scene, Router, Stack } from 'react-native-router-flux';
|
|||||||
import Categories from './components/Categories';
|
import Categories from './components/Categories';
|
||||||
import LessonCategories from './components/LessonCategories';
|
import LessonCategories from './components/LessonCategories';
|
||||||
import AnatomyCard from './components/AnatomyCard';
|
import AnatomyCard from './components/AnatomyCard';
|
||||||
|
import Lesson from './components/Lesson';
|
||||||
|
|
||||||
const RouterComponent = () => {
|
const RouterComponent = () => {
|
||||||
const { headerTextStyle } = styles;
|
const { headerTextStyle } = styles;
|
||||||
@@ -30,6 +31,13 @@ const RouterComponent = () => {
|
|||||||
headerStyle={headerStyle('#808285')}
|
headerStyle={headerStyle('#808285')}
|
||||||
headerTitleStyle={headerTextStyle}
|
headerTitleStyle={headerTextStyle}
|
||||||
/>
|
/>
|
||||||
|
<Scene
|
||||||
|
key="lesson"
|
||||||
|
component={Lesson}
|
||||||
|
title="IMA LI MLIJEKA?"
|
||||||
|
headerStyle={headerStyle('#7270a8')}
|
||||||
|
headerTitleStyle={headerTextStyle}
|
||||||
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Router>
|
</Router>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -12,10 +12,6 @@ const Lesson = (props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={categoriesContainerStyle}>
|
<View style={categoriesContainerStyle}>
|
||||||
<ApplicationHeader
|
|
||||||
headerText={props.lessonHeaderText}
|
|
||||||
headerBackgroudColor={props.lessonHeaderBackroundColor}
|
|
||||||
/>
|
|
||||||
<View style={categoriesListStyle}>
|
<View style={categoriesListStyle}>
|
||||||
{renderQuestions()}
|
{renderQuestions()}
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -1,12 +1,28 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { View } from 'react-native';
|
import { View } from 'react-native';
|
||||||
|
import { Actions } from 'react-native-router-flux';
|
||||||
import CategoryItem from './CategoryItem';
|
import CategoryItem from './CategoryItem';
|
||||||
|
|
||||||
const LessonCategories = () => {
|
const LessonCategories = () => {
|
||||||
const { categoriesContainerStyle, categoriesListStyle } = styles;
|
const { categoriesContainerStyle, categoriesListStyle } = styles;
|
||||||
|
|
||||||
const onLessonSelected = (selectedLesson) => {
|
const onLessonSelected = (selectedLesson) => {
|
||||||
console.log(selectedLesson);
|
switch(selectedLesson){
|
||||||
|
case 'IMA LI MLIJEKA?':
|
||||||
|
Actions.lesson({
|
||||||
|
lessonHeaderText: 'IMA LI MLIJEKA?',
|
||||||
|
questions:
|
||||||
|
['Kako funkcioniše produkcija mlijeka?',
|
||||||
|
'Uspostavljanje i zadržavanje zaliha mlijeka kad beba ne doji',
|
||||||
|
'Prejak refleks otpuštanja mlijeka ili prekomjerne zalihe',
|
||||||
|
'Koje biljke izbjegavati za vrijeme dojenja'
|
||||||
|
],
|
||||||
|
lessonHeaderBackroundColor: '#7270a8'
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
console.log(selectedLesson);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
Reference in New Issue
Block a user