/**
 * All About Olaf
 * iOS Directory page
 */

import React from 'react'
import {
  StyleSheet,
  View,
  Text,
} from 'react-native'
import NavigatorScreen from './components/navigator-screen'
import queryStalkernet from '../lib/stalkernet'

export default class DirectoryView extends React.Component {
  render() {
    return <NavigatorScreen
      {...this.props}
      title="Directory"
      renderScene={this.renderScene.bind(this)}
    />
  }

  // Render a given scene
  renderScene() {
    return (
      <View style={styles.container}>
        <Text>Directory</Text>
      </View>
    )
  }
}

var styles = StyleSheet.create({
  container: {
    flex: 1,
  }
})

@@ -21,12 +21,8 @@
 f%0A *
- iOS
  Dir
@@ -97,20 +97,34 @@
 View,%0A  
-Text
+NetInfo,%0A  WebView
 ,%0A%7D from
@@ -139,16 +139,17 @@
 native'%0A
+%0A
 import N
@@ -204,117 +204,783 @@
 en'%0A
-import queryStalkernet from '../lib/stalkernet'%0A%0Aexport default class DirectoryView extends React.Component %7B
+%0Aconst styles = StyleSheet.create(%7B%0A  container: %7B%0A    flex: 1,%0A  %7D,%0A  webView: %7B%0A    flex: 1,%0A  %7D%0A%7D)%0A%0Aconst URL = 'https://www.stolaf.edu/personal/'%0A%0Aexport default class DirectoryView extends React.Component %7B%0A  constructor() %7B%0A    super()%0A    this.scalesPageToFit = true%0A    this.url = URL%0A    this.state = %7B%0A      isConnected: true%0A    %7D%0A  %7D%0A%0A  componentWillMount() %7B%0A    NetInfo.isConnected.fetch().then(isConnected =%3E %7B%0A      this._onConnectivityChange(isConnected)%0A    %7D)%0A    NetInfo.isConnected.addEventListener('change', this._onConnectivityChange.bind(this))%0A  %7D%0A%0A  componentWillUnmount() %7B%0A    NetInfo.isConnected.removeEventListener('change', this._onConnectivityChange.bind(this))%0A  %7D%0A%0A  _onConnectivityChange(isConnected) %7B%0A    this.setState(%7BisConnected%7D)%0A  %7D%0A
 %0A  r
@@ -1129,49 +1129,63 @@
 %0A%0A  
-// R
+r
 ender
- a given scene%0A  renderScene() %7B
+Scene() %7B%0A    let webViewSource = %7Buri: this.url%7D
 %0A   
@@ -1245,121 +1245,608 @@
    %3C
-Text%3EDirectory%3C/Text%3E%0A      %3C/
+WebView%0A          automaticallyAdjustContentInsets=%7Bfalse%7D%0A          style=%7Bstyles.web
 View
-%3E%0A
+%7D%0A 
     
-)%0A  %7D%0A%7D%0A%0Avar styles = StyleSheet.create(%7B%0A  container: %7B%0A    flex: 1,
+     source=%7BwebViewSource%7D%0A          javaScriptEnabled=%7Btrue%7D%0A          onNavigationStateChange=%7Bthis.onNavigationStateChange.bind(this)%7D%0A          onShouldStartLoadWithRequest=%7Bthis.onShouldStartLoadWithRequest.bind(this)%7D%0A          startInLoadingState=%7Btrue%7D%0A          scalesPageToFit=%7Bthis.scalesPageToFit%7D%0A        /%3E%0A      %3C/View%3E%0A    )%0A  %7D%0A%0A  onShouldStartLoadWithRequest() %7B%0A    return true%0A  %7D%0A%0A  onNavigationStateChange(navState) %7B%0A    this.url = navState.url%0A    this.scalesPageToFit = true
 %0A  %7D%0A%7D
-)
 %0A

Add webview for Directories