import React, { Component } from 'react';

import {
  StyleSheet,
  Text,
  View,
  Image,
  TouchableOpacity,
  ListView,
  ScrollView
} from 'react-native';

let styles = StyleSheet.create({
  container: {
   flex: 1,
   paddingTop: 20,
   backgroundColor: '#43C6C6'
  },
})

class ClassList extends Component {
  constructor(props) {
    super(props);
    this.state= {
      dataSource: new ListView.DataSource({
        rowHasChanged: (r1, r2) => r1 !== r2,
      }),
      loaded: false,
    }
  }

  componentDidMount() {
    this.fetchData();
  }

  fetchData() {
    this.setState({
      dataSource: this.state.dataSource.cloneWithRows(mockTeacher[0].courses),
      loaded: true
    })
  }

  renderCourses(course) {
    return (
      <CourseCell course={course} />
    )
  }

  render() {
    return(
      <View style={styles.container}>
        <BrowseClassesView />
      </View>
    )
  }
}



export default ClassList;

@@ -267,16 +267,546 @@
 6'%0A  %7D,%0A
+  courseCell: %7B%0A    flex:1,%0A    flexDirection: 'row',%0A    justifyContent: 'center',%0A    padding: 4,%0A    borderBottomWidth: .5,%0A    borderColor: 'lightgray'%0A  %7D,%0A  rightContainer: %7B%0A    flex: 1,%0A    flexDirection: 'row',%0A    paddingLeft: 25,%0A    alignItems: 'center'%0A  %7D,%0A  whiteText: %7B%0A    fontSize: 18,%0A    color: 'white'%0A  %7D,%0A  lightText: %7B%0A    color: 'white'%0A  %7D,%0A  descContainer: %7B%0A    flex: 1,%0A    alignItems: 'center',%0A    justifyContent: 'space-between'%0A  %7D,%0A  seperator: %7B%0A    height: 1,%0A    backgroundColor: 'white'%0A  %7D,%0A
 %7D)%0A%0Aclas
@@ -1433,16 +1433,683 @@
   %7D%0A%7D%0A%0A%0A
+var ReviewCourse = React.createClass(%7B%0A  render() %7B%0A    return(%0A      %3CView%3E%0A        %3CView style=%7Bstyles.courseCell%7D%3E%0A           %3CView style=%7Bstyles.rightContainer%7D%3E%0A             %3CView%3E%0A               %3CText style=%7Bstyles.whiteText%7D%3E%0A                %7Bthis.props.course.title%7D%0A               %3C/Text%3E%0A               %3CText style=%7Bstyles.lightText%7D%3E%0A                 Instructor: %7Bthis.props.course.teacher%7D%0A               %3C/Text%3E%0A               %3CText style=%7Bstyles.lightText%7D%3E%0A                 Summary: %7Bthis.props.course.summary%7D%0A               %3C/Text%3E%0A             %3C/View%3E%0A        %3C/View%3E%0A      %3C/View%3E%0A      %3CView style=%7Bstyles.separator%7D/%3E%0A      %3C/View%3E%0A    )%0A  %7D%0A%7D)%0A%0A
 %0Aexport 

add review course class