|
|
@@ -1,6 +1,6 @@
|
|
|
import _ from 'lodash';
|
|
|
import React, { Component } from 'react';
|
|
|
-import { Text, WebView, View } from 'react-native';
|
|
|
+import { Text, WebView, ScrollView, View, TouchableOpacity } from 'react-native';
|
|
|
import { connect } from 'react-redux';
|
|
|
import { Actions } from 'react-native-router-flux';
|
|
|
import { claseFetch } from '../actions/';
|
|
|
@@ -16,26 +16,34 @@ class Clase extends Component {
|
|
|
const { clase } = this.props;
|
|
|
console.log("props", this.props);
|
|
|
return (
|
|
|
- <Card>
|
|
|
- <CardSection>
|
|
|
- <Text>{clase.titulo}</Text>
|
|
|
- </CardSection>
|
|
|
- <CardSection>
|
|
|
- <Text>{clase.profesor.nombre} {clase.profesor.apellido}</Text>
|
|
|
- </CardSection>
|
|
|
- <CardSection>
|
|
|
- <WebView
|
|
|
- style={{height:300}}
|
|
|
- scalesPageToFit={true}
|
|
|
- javaScriptEnabled={false}
|
|
|
- source={{html: clase.texto}} />
|
|
|
- </CardSection>
|
|
|
- <CardSection>
|
|
|
- <Text>
|
|
|
- Comentarios
|
|
|
- </Text>
|
|
|
- </CardSection>
|
|
|
- </Card>
|
|
|
+ <ScrollView>
|
|
|
+ <Card>
|
|
|
+ <CardSection>
|
|
|
+ <Text>{clase.titulo}</Text>
|
|
|
+ </CardSection>
|
|
|
+
|
|
|
+ <CardSection>
|
|
|
+ <TouchableOpacity onPress={() => Actions.ViewProf({ id: clase.profesor._id})}>
|
|
|
+ <Text style={{flex:1, color: '#007aff', fontWeight: '600'}}>
|
|
|
+ {clase.profesor.nombre} {clase.profesor.apellido}
|
|
|
+ </Text>
|
|
|
+ </TouchableOpacity>
|
|
|
+ </CardSection>
|
|
|
+
|
|
|
+ <CardSection>
|
|
|
+ <WebView
|
|
|
+ style={{height:1700}}
|
|
|
+ scalesPageToFit={true}
|
|
|
+ javaScriptEnabled={false}
|
|
|
+ source={{html: clase.texto}} />
|
|
|
+ </CardSection>
|
|
|
+ <CardSection>
|
|
|
+ <Text>
|
|
|
+ Comentarios
|
|
|
+ </Text>
|
|
|
+ </CardSection>
|
|
|
+ </Card>
|
|
|
+ </ScrollView>
|
|
|
);
|
|
|
}
|
|
|
};
|