moment dependencia
This commit is contained in:
parent
094b5ee5bb
commit
338bee8192
|
@ -1,14 +1,13 @@
|
|||
|
||||
import React, {Component} from 'react';
|
||||
import {Platform, StyleSheet, Text, View, StatusBar,Dimensions,Image,ActivityIndicator} from 'react-native';
|
||||
import {Platform, StyleSheet, Text, View, StatusBar, Dimensions, Image, ActivityIndicator} from 'react-native';
|
||||
|
||||
import {bindActionCreators} from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
import {connect} from 'react-redux';
|
||||
|
||||
import QRCodeScanner from 'react-native-qrcode-scanner';
|
||||
import {UtilStyles} from './assets/styles'
|
||||
import * as Actions from './actions'; //Import your actions
|
||||
import {RkButton, RkTheme , RkText} from 'react-native-ui-kitten';
|
||||
import {RkButton, RkTheme, RkText} from 'react-native-ui-kitten';
|
||||
|
||||
import Router from './Router'
|
||||
|
||||
|
@ -16,7 +15,7 @@ const SCREEN_HEIGHT = Dimensions.get("window").height;
|
|||
const SCREEN_WIDTH = Dimensions.get("window").width;
|
||||
|
||||
|
||||
class App extends Component {
|
||||
class App extends Component {
|
||||
|
||||
constructor(props) {
|
||||
|
||||
|
@ -24,10 +23,10 @@ const SCREEN_WIDTH = Dimensions.get("window").width;
|
|||
|
||||
this.state = {
|
||||
|
||||
token:{valid:false},
|
||||
token: {valid: false},
|
||||
tokenData: '',
|
||||
onHold: true,
|
||||
logged:false
|
||||
logged: false
|
||||
|
||||
};
|
||||
|
||||
|
@ -43,7 +42,7 @@ const SCREEN_WIDTH = Dimensions.get("window").width;
|
|||
onSuccess = (e) => {
|
||||
|
||||
|
||||
this.props.login(e.data,'80f3b6e5');
|
||||
this.props.login(e.data, '80f3b6e5');
|
||||
console.log("tentativa de login");
|
||||
|
||||
|
||||
|
@ -51,16 +50,14 @@ const SCREEN_WIDTH = Dimensions.get("window").width;
|
|||
|
||||
render() {
|
||||
|
||||
if(this.props.onHold && !this.props.logged){
|
||||
if (this.props.onHold && !this.props.logged) {
|
||||
|
||||
|
||||
return (
|
||||
|
||||
<View>
|
||||
<View style={UtilStyles.containerLoading}>
|
||||
<Text>CARREGANDO {this.props.onHold}</Text>
|
||||
<ActivityIndicator size="large" color="#0000ff" />
|
||||
<ActivityIndicator size="large" color="#0000ff"/>
|
||||
</View>
|
||||
|
||||
)
|
||||
|
||||
}
|
||||
|
@ -72,16 +69,14 @@ const SCREEN_WIDTH = Dimensions.get("window").width;
|
|||
//se existir token
|
||||
|
||||
|
||||
if(this.props.logged){
|
||||
if (this.props.logged) {
|
||||
|
||||
return (
|
||||
|
||||
<Router></Router>
|
||||
|
||||
)
|
||||
|
||||
}
|
||||
else{
|
||||
else {
|
||||
|
||||
//se não existir vai para o ecrã de scan QR
|
||||
return (
|
||||
|
@ -91,7 +86,7 @@ const SCREEN_WIDTH = Dimensions.get("window").width;
|
|||
showMarker
|
||||
reactivate={true}
|
||||
onRead={this.onSuccess.bind(this)}
|
||||
cameraStyle={{ height: SCREEN_HEIGHT }}
|
||||
cameraStyle={{height: SCREEN_HEIGHT}}
|
||||
|
||||
customMarker={
|
||||
|
||||
|
@ -103,7 +98,7 @@ const SCREEN_WIDTH = Dimensions.get("window").width;
|
|||
</View>
|
||||
|
||||
|
||||
<View style={{ flexDirection: "row" }}>
|
||||
<View style={{flexDirection: "row"}}>
|
||||
<View style={styles.leftAndRightOverlay}>
|
||||
</View>
|
||||
|
||||
|
@ -118,7 +113,7 @@ const SCREEN_WIDTH = Dimensions.get("window").width;
|
|||
|
||||
<View style={styles.bottomOverlay}>
|
||||
|
||||
<View style={{flex:1, alignItems: 'center', alignContent: 'center'}}>
|
||||
<View style={{flex: 1, alignItems: 'center', alignContent: 'center'}}>
|
||||
|
||||
<RkText rkType='primary' style={styles.recover}>Recuperar pin de acesso</RkText>
|
||||
<RkButton rkType='dark' style={styles.manual}>lols</RkButton>
|
||||
|
@ -132,24 +127,18 @@ const SCREEN_WIDTH = Dimensions.get("window").width;
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
RkTheme.setType('RkButton', 'dark', {
|
||||
container: {
|
||||
paddingTop:10,
|
||||
paddingTop: 10,
|
||||
backgroundColor: 'gray',
|
||||
|
||||
borderRadius: 90,
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
const rectDimensions = SCREEN_WIDTH * 0.85; // this is equivalent to 255 from a 393 device width
|
||||
|
@ -158,21 +147,17 @@ const overlayColor = 'rgba(0,0,0,0.30)';
|
|||
|
||||
const styles = {
|
||||
|
||||
recover:{
|
||||
paddingTop:10,
|
||||
recover: {
|
||||
paddingTop: 10,
|
||||
color: "red",
|
||||
paddingBottom:10
|
||||
paddingBottom: 10
|
||||
},
|
||||
manual:{
|
||||
manual: {},
|
||||
|
||||
logo: {
|
||||
|
||||
|
||||
},
|
||||
|
||||
logo:{
|
||||
|
||||
height:SCREEN_HEIGHT*0.35,
|
||||
width:SCREEN_WIDTH,
|
||||
height: SCREEN_HEIGHT * 0.35,
|
||||
width: SCREEN_WIDTH,
|
||||
backgroundColor: overlayColor,
|
||||
},
|
||||
rectangleContainer: {
|
||||
|
@ -215,23 +200,20 @@ const styles = {
|
|||
},
|
||||
};
|
||||
|
||||
|
||||
function mapStateToProps(state, props) {
|
||||
mapStateToProps = (state, props) => {
|
||||
|
||||
return {
|
||||
|
||||
token: state.apiReducer.token,
|
||||
loggedIn: state.apiReducer.loggedIn,
|
||||
onHold: state.apiReducer.onHold,
|
||||
logged:state.apiReducer.logged
|
||||
|
||||
logged: state.apiReducer.logged
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function mapDispatchToProps(dispatch) {
|
||||
mapDispatchToProps = (dispatch) => {
|
||||
|
||||
return bindActionCreators(Actions, dispatch);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
export default connect(mapStateToProps, mapDispatchToProps)(App);
|
|
@ -14,6 +14,8 @@ import { AsyncStorage } from 'react-native';
|
|||
import Data from '../intructions.json';
|
||||
import Login from '../screens/Login.js';
|
||||
|
||||
import moment from 'moment'
|
||||
|
||||
export function getData(){
|
||||
return (dispatch) => {
|
||||
|
||||
|
@ -30,15 +32,15 @@ export function getData(){
|
|||
|
||||
export function getEvents(user){
|
||||
return (dispatch)=>{
|
||||
var o=[];
|
||||
let events = [];
|
||||
console.log("chegou aqui")
|
||||
|
||||
|
||||
for(var key in user.Sessions){
|
||||
for(let key in user.Sessions){
|
||||
|
||||
o.push({
|
||||
time:user.Sessions[key].SessionStart.substr(11, 14),
|
||||
timeEnd: user.Sessions[key].SessionEnd.substr(11, 14),
|
||||
events.push({
|
||||
time: moment(user.Sessions[key].SessionStart).format('h:mm'),
|
||||
timeEnd: moment(user.Sessions[key].SessionEnd).format('h:mm'),
|
||||
lineColor:'#009688',
|
||||
imageUrl: 'https://d2v9y0dukr6mq2.cloudfront.net/video/thumbnail/Vjkyj2hBg/welcome-white-sign-with-falling-colorful-confetti-animation-on-white-background_sglmmh3qm__F0013.png',
|
||||
description:user.Sessions[key].Description,
|
||||
|
@ -51,8 +53,7 @@ export function getEvents(user){
|
|||
|
||||
dispatch({
|
||||
type: GET_EVENTS,
|
||||
events: o
|
||||
|
||||
events: events
|
||||
|
||||
});
|
||||
|
||||
|
@ -89,7 +90,6 @@ const saveToken = async token => {
|
|||
obj={}
|
||||
try {
|
||||
|
||||
|
||||
obj.access_token = await AsyncStorage.getItem('userToken') || 'none';
|
||||
obj.expirationDateToken = await AsyncStorage.getItem('expirationDateToken') || 'none';
|
||||
obj.refreshToken = await AsyncStorage.getItem('refreshToken') || 'none';
|
||||
|
|
|
@ -23,7 +23,7 @@ const apiReducer = (state = apiState, action) => {
|
|||
|
||||
case HOLD:
|
||||
|
||||
state=Object.assign({},state, {onHold:true});
|
||||
state=Object.assign({},state, { onHold:true });
|
||||
return state;
|
||||
|
||||
case API_LOGIN:
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as React from 'react';
|
||||
import { View, StyleSheet, Dimensions , Image, ScrollView,Text, Button} from 'react-native';
|
||||
import { TabView, TabBar, SceneMap } from 'react-native-tab-view';
|
||||
import {View, StyleSheet, Dimensions, Image, ScrollView, Text, Button} from 'react-native';
|
||||
import {TabView, TabBar, SceneMap} from 'react-native-tab-view';
|
||||
import {
|
||||
RkButton,RkCard, RkText,
|
||||
RkButton, RkCard, RkText,
|
||||
RkTheme
|
||||
} from 'react-native-ui-kitten';
|
||||
import Timeline from 'react-native-timeline-feed'
|
||||
|
@ -10,64 +10,56 @@ import Timeline from 'react-native-timeline-feed'
|
|||
import * as Progress from 'react-native-progress';
|
||||
|
||||
|
||||
import { connect } from 'react-redux';
|
||||
import {connect} from 'react-redux';
|
||||
|
||||
import {bindActionCreators} from 'redux';
|
||||
|
||||
import * as Actions from '../actions'; //Import your actionss
|
||||
|
||||
|
||||
const formatObj = (obj) => {
|
||||
|
||||
const formatObj= (obj)=>{
|
||||
let a = {};
|
||||
|
||||
let a={};
|
||||
|
||||
a.push({
|
||||
|
||||
|
||||
})
|
||||
a.push({})
|
||||
|
||||
return a
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
const ThirdRoute = () => (
|
||||
<View style={[styles.scene, { backgroundColor: '#efc44a' }]} />
|
||||
<View style={[styles.scene, {backgroundColor: '#efc44a'}]}/>
|
||||
);
|
||||
|
||||
|
||||
const FourthRoute = () => (
|
||||
<View style={[styles.scene, { backgroundColor: '#49ef97' }]} />
|
||||
<View style={[styles.scene, {backgroundColor: '#49ef97'}]}/>
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
class Calendar extends React.Component {
|
||||
|
||||
state = {
|
||||
index: 0,
|
||||
routes: [
|
||||
{ key: 'first', title: 'Sex 12' },
|
||||
{ key: 'second', title: 'Sab 13' },
|
||||
{ key: 'third', title: 'Dom 14' },
|
||||
{ key: 'fourth', title: 'Seg 15' },
|
||||
{key: 'first', title: 'Sex 12'},
|
||||
{key: 'second', title: 'Sab 13'},
|
||||
{key: 'third', title: 'Dom 14'},
|
||||
{key: 'fourth', title: 'Seg 15'},
|
||||
|
||||
],
|
||||
};
|
||||
};
|
||||
|
||||
componentDidMount(){
|
||||
componentDidMount() {
|
||||
|
||||
this.props.getEvents(this.props.user);
|
||||
console.log('didMount');
|
||||
console.log(this.props.events);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
renderDetail = ({ item, index })=> {
|
||||
renderDetail = ({item, index}) => {
|
||||
// <Image source={{ uri:item.imageUrl, width:'100%' , height:100 }} style={{borderRadius:0}}/>
|
||||
return (
|
||||
|
||||
|
@ -79,51 +71,48 @@ renderDetail = ({ item, index })=> {
|
|||
|
||||
<Text style={styles.description}>{item.description}</Text>
|
||||
<View style={styles.details}>
|
||||
<Progress.Bar color={'#42a5f5'} progress={0.3} unfilledColor = {'white'}width={210} />
|
||||
<Progress.Bar color={'#42a5f5'} progress={0.3} unfilledColor={'white'} width={210}/>
|
||||
<Text>{item.Enrolled} / {item.MaxAttendees}</Text>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
renderEvents = ({ item, index })=> {
|
||||
renderEvents = ({item, index}) => {
|
||||
|
||||
return (
|
||||
<View style={styles.event}>
|
||||
<Text style={[styles.title]}>{item.title}</Text>
|
||||
<View>
|
||||
|
||||
<Image source={{ uri:item.imageUrl, width:'100%' , height:100 }} style={{borderRadius:0}}/>
|
||||
|
||||
<Image source={{uri: item.imageUrl, width: '100%', height: 100}} style={{borderRadius: 0}}/>
|
||||
|
||||
|
||||
<Text style={styles.description}>{item.description}</Text>
|
||||
<View style={styles.details}>
|
||||
<Progress.Bar color={'#42a5f5'} progress={0.3} unfilledColor = {'white'}width={210} />
|
||||
<Progress.Bar color={'#42a5f5'} progress={0.3} unfilledColor={'white'} width={210}/>
|
||||
<Text>1/50</Text>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
_update=()=>{
|
||||
this.setState({ user: this.props.user });
|
||||
_update = () => {
|
||||
this.setState({user: this.props.user});
|
||||
console.log(this.props.events);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
constructor(){
|
||||
constructor() {
|
||||
|
||||
super()
|
||||
|
||||
|
||||
|
||||
const archeryImgSource = require('../assets/img/archery.png');
|
||||
const badmintonImgSource = require('../assets/img/badminton.png');
|
||||
const lunchImgSource = require('../assets/img/lunch.png');
|
||||
|
@ -144,14 +133,14 @@ constructor(){
|
|||
time: '09:30',
|
||||
title: 'Sessão de Check-In',
|
||||
description: 'Os participantes devem fazer o check-in e recolher o kit fornecido pela organização',
|
||||
lineColor:'#009688',
|
||||
lineColor: '#009688',
|
||||
icon: ArcheryImage,
|
||||
imageUrl: 'https://blogsimages.adobe.com/conversations/files/2014/03/Check_In-1.jpg'
|
||||
},
|
||||
{
|
||||
time: '17:45',
|
||||
title: 'Sessão de Abertura',
|
||||
lineColor:'#009688',
|
||||
lineColor: '#009688',
|
||||
description: 'Bem vindo a Coimbra, a cidade dos estudantes! Obrigado por participares na 13ª edição do ENEI.',
|
||||
icon: BadmintonImage,
|
||||
imageUrl: 'https://d2v9y0dukr6mq2.cloudfront.net/video/thumbnail/Vjkyj2hBg/welcome-white-sign-with-falling-colorful-confetti-animation-on-white-background_sglmmh3qm__F0013.png'
|
||||
|
@ -159,7 +148,7 @@ constructor(){
|
|||
{
|
||||
time: '19:30',
|
||||
title: 'Jantar',
|
||||
lineColor:'#009688',
|
||||
lineColor: '#009688',
|
||||
description: 'Time to eat',
|
||||
icon: BadmintonImage,
|
||||
imageUrl: 'https://www.retailmenot.com/blog/wp-content/uploads/2016/08/kids-eat-free-hero1-1471459190.jpg'
|
||||
|
@ -168,7 +157,7 @@ constructor(){
|
|||
{
|
||||
time: '23:30',
|
||||
title: 'Festarola',
|
||||
lineColor:'#009688',
|
||||
lineColor: '#009688',
|
||||
description: 'Sabes beber? Se não sabes, aprende com os da casa!',
|
||||
icon: BadmintonImage,
|
||||
imageUrl: 'http://www.revistaversatille.com.br/wp-content/uploads/Party.jpg'
|
||||
|
@ -176,34 +165,38 @@ constructor(){
|
|||
|
||||
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
render() {
|
||||
|
||||
const FirstRoute = () => (
|
||||
|
||||
|
||||
<ScrollView contentContainerStyle={styles.contentContainer} >
|
||||
<ScrollView contentContainerStyle={styles.contentContainer}>
|
||||
|
||||
|
||||
<Button onPress={this._update} title="LOGOUT"/>
|
||||
<Timeline
|
||||
|
||||
|
||||
|
||||
data={this.props.events}
|
||||
|
||||
timeContainerStyle={{minWidth:52, marginTop: 5}}
|
||||
timeStyle={{textAlign: 'center', backgroundColor:'#ff9797', color:'white', padding:5, borderRadius:13}}
|
||||
descriptionStyle={{color:'gray'}}
|
||||
timeContainerStyle={{minWidth: 52, marginTop: 5}}
|
||||
timeStyle={{
|
||||
textAlign: 'center',
|
||||
backgroundColor: '#ff9797',
|
||||
color: 'white',
|
||||
padding: 5,
|
||||
borderRadius: 13
|
||||
}}
|
||||
descriptionStyle={{color: 'gray'}}
|
||||
|
||||
renderDetail={this.renderDetail}
|
||||
|
||||
|
||||
flatListProps={{
|
||||
style:{
|
||||
style: {
|
||||
|
||||
margin:15
|
||||
margin: 15
|
||||
}
|
||||
|
||||
|
||||
|
@ -217,29 +210,34 @@ render() {
|
|||
</ScrollView>
|
||||
|
||||
)
|
||||
|
||||
const SecondRoute = () => (
|
||||
|
||||
|
||||
<ScrollView contentContainerStyle={styles.contentContainer} >
|
||||
|
||||
<ScrollView contentContainerStyle={styles.contentContainer}>
|
||||
|
||||
<Timeline
|
||||
|
||||
|
||||
|
||||
data={this.props.events}
|
||||
|
||||
timeContainerStyle={{minWidth:52, marginTop: 5}}
|
||||
timeStyle={{textAlign: 'center', backgroundColor:'#ff9797', color:'white', padding:5, borderRadius:13}}
|
||||
descriptionStyle={{color:'gray'}}
|
||||
timeContainerStyle={{minWidth: 52, marginTop: 5}}
|
||||
timeStyle={{
|
||||
textAlign: 'center',
|
||||
backgroundColor: '#ff9797',
|
||||
color: 'white',
|
||||
padding: 5,
|
||||
borderRadius: 13
|
||||
}}
|
||||
descriptionStyle={{color: 'gray'}}
|
||||
|
||||
renderDetail={this.renderDetail}
|
||||
|
||||
|
||||
flatListProps={{
|
||||
style:{
|
||||
style: {
|
||||
|
||||
margin:15
|
||||
margin: 15
|
||||
}
|
||||
|
||||
|
||||
|
@ -255,7 +253,6 @@ render() {
|
|||
)
|
||||
return (
|
||||
|
||||
|
||||
<TabView
|
||||
navigationState={this.state}
|
||||
renderScene={SceneMap({
|
||||
|
@ -264,32 +261,32 @@ render() {
|
|||
third: ThirdRoute,
|
||||
fourth: FourthRoute
|
||||
})}
|
||||
onIndexChange={index => this.setState({ index })}
|
||||
initialLayout={{ width: Dimensions.get('window').width,height: Dimensions.get('window').height}}
|
||||
onIndexChange={index => this.setState({index})}
|
||||
initialLayout={{width: Dimensions.get('window').width, height: Dimensions.get('window').height}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
details:{
|
||||
backgroundColor:"#e0e0e0",
|
||||
borderBottomRightRadius:10,
|
||||
borderBottomLeftRadius:10,
|
||||
padding:10
|
||||
details: {
|
||||
backgroundColor: "#e0e0e0",
|
||||
borderBottomRightRadius: 10,
|
||||
borderBottomLeftRadius: 10,
|
||||
padding: 10
|
||||
},
|
||||
description:{
|
||||
padding:10
|
||||
description: {
|
||||
padding: 10
|
||||
},
|
||||
title:{
|
||||
color:'#212121',
|
||||
title: {
|
||||
color: '#212121',
|
||||
fontWeight: 'bold',
|
||||
fontSize:15,
|
||||
padding:10
|
||||
fontSize: 15,
|
||||
padding: 10
|
||||
},
|
||||
event:{
|
||||
borderRadius:10,
|
||||
backgroundColor:'#eeeeee',
|
||||
event: {
|
||||
borderRadius: 10,
|
||||
backgroundColor: '#eeeeee',
|
||||
|
||||
},
|
||||
scene: {
|
||||
|
@ -298,7 +295,8 @@ const styles = StyleSheet.create({
|
|||
contentContainer: {
|
||||
paddingVertical: 20
|
||||
}
|
||||
});RkTheme.setType('RkCard', 'story', {
|
||||
});
|
||||
RkTheme.setType('RkCard', 'story', {
|
||||
img: {
|
||||
height: 100,
|
||||
opacity: 0.7
|
||||
|
@ -306,13 +304,12 @@ const styles = StyleSheet.create({
|
|||
header: {
|
||||
alignSelf: 'center'
|
||||
},
|
||||
content:{
|
||||
alignSelf:'center'
|
||||
content: {
|
||||
alignSelf: 'center'
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
function mapStateToProps(state, props) {
|
||||
|
||||
return {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React, {Component} from 'react';
|
||||
|
||||
import { Button, View, Text , TouchableOpacity, FlatList, ActivityIndicator} from 'react-native';
|
||||
import {Button, View, Text, TouchableOpacity, FlatList, ActivityIndicator} from 'react-native';
|
||||
|
||||
|
||||
import {
|
||||
|
@ -9,7 +9,7 @@ import {
|
|||
} from 'react-native-ui-kitten';
|
||||
|
||||
|
||||
import { connect } from 'react-redux';
|
||||
import {connect} from 'react-redux';
|
||||
|
||||
import {bindActionCreators} from 'redux';
|
||||
|
||||
|
@ -30,10 +30,10 @@ class Home extends Component {
|
|||
|
||||
this.state = {
|
||||
|
||||
token:{valid:false},
|
||||
logged:true,
|
||||
onHold:true,
|
||||
user:{Name:''}
|
||||
token: {valid: false},
|
||||
logged: true,
|
||||
onHold: true,
|
||||
user: {Name: ''}
|
||||
};
|
||||
|
||||
|
||||
|
@ -62,7 +62,7 @@ class Home extends Component {
|
|||
|
||||
//this.props.logoutUser();
|
||||
|
||||
let a={};
|
||||
let a = {};
|
||||
// this.setState({ user: this.props.user });
|
||||
// console.log(this.props.user)
|
||||
//
|
||||
|
@ -79,22 +79,22 @@ class Home extends Component {
|
|||
// this.props.logout();
|
||||
this.props.logoutUser();
|
||||
}
|
||||
update=()=>{
|
||||
update = () => {
|
||||
|
||||
|
||||
this.setState({ user: this.props.user });
|
||||
var o=[];
|
||||
this.setState({user: this.props.user});
|
||||
var o = [];
|
||||
|
||||
for(var key in this.props.user.Sessions){
|
||||
for (var key in this.props.user.Sessions) {
|
||||
|
||||
|
||||
o.push({
|
||||
time:this.props.user.Sessions[key].SessionStart.substr(11, 16),
|
||||
time: this.props.user.Sessions[key].SessionStart.substr(11, 16),
|
||||
timeEnd: this.props.user.Sessions[key].SessionEnd.substr(11, 16),
|
||||
lineColor:'#009688',
|
||||
lineColor: '#009688',
|
||||
imageUrl: 'https://d2v9y0dukr6mq2.cloudfront.net/video/thumbnail/Vjkyj2hBg/welcome-white-sign-with-falling-colorful-confetti-animation-on-white-background_sglmmh3qm__F0013.png',
|
||||
description:this.props.user.Sessions[key].Description,
|
||||
name:this.props.user.Sessions[key].Name,
|
||||
description: this.props.user.Sessions[key].Description,
|
||||
name: this.props.user.Sessions[key].Name,
|
||||
|
||||
|
||||
})
|
||||
|
@ -102,24 +102,24 @@ class Home extends Component {
|
|||
}
|
||||
console.log(this.props.user.Sessions);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
|
||||
|
||||
const { navigate } = this.props.navigation;
|
||||
const {navigate} = this.props.navigation;
|
||||
|
||||
|
||||
if(this.props.onHold){
|
||||
if (this.props.onHold) {
|
||||
|
||||
return (
|
||||
<View>
|
||||
<Text>lollsss {this.props.onHold}</Text>
|
||||
<ActivityIndicator size="large" color="#0000ff" />
|
||||
<ActivityIndicator size="large" color="#0000ff"/>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
if(this.props.logged){
|
||||
if (this.props.logged) {
|
||||
|
||||
return (
|
||||
<View>
|
||||
|
|
|
@ -6076,6 +6076,11 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.24.0",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz",
|
||||
"integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg=="
|
||||
},
|
||||
"morgan": {
|
||||
"version": "1.9.1",
|
||||
"resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz",
|
||||
|
|
|
@ -8,8 +8,9 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.18.0",
|
||||
"prop-types": "^15.6.2",
|
||||
"material-icons-react": "^1.0.4",
|
||||
"moment": "^2.24.0",
|
||||
"prop-types": "^15.6.2",
|
||||
"react": "16.6.3",
|
||||
"react-native": "0.57.8",
|
||||
"react-native-app-intro-slider": "^1.0.1",
|
||||
|
|
Loading…
Reference in New Issue