import React from 'react'
import Tabs, {Tab} from 'material-ui/Tabs'
import {MuiThemeProvider} from 'material-ui/styles'
import Card from 'material-ui/Card'
import theme from './theme'
import {Link} from "react-static";

class NavBar extends React.Component {
  constructor (props) {
    super(props)
    this.home =
    this.resume = <Link to='/resume'/>
    this.blog = <Link to='/blog'/>
    this.about = <Link to='/about'/>
    this.pageList = ['', '/', '/resume', '/blog', '/about']
    this.state = {
      selection: this.pageList.indexOf('/'+window.location.pathname.split('/')[1]),
    }
  }
  handleChange = (event, value) => {
    this.setState({selection: value})
  }
  render () {
    return (
      <MuiThemeProvider theme={theme}>
        <div
          style={{position: 'fixed', width: '100%'}}
        >
          <Card
            raised
            className='top-bar'
            style={{maxWidth: '960px', margin: '0 auto'}}
          >
            <Tabs
              centered
              value={this.state.selection}
              indicatorColor="grey"
              onChange={this.handleChange}
            >
              <Tab label="Tanay PrabhuDesai" disabled />
              <Tab to="/" label={<Link to='/'>Home</Link>} onClick={this.home.onClick} />
              <Tab to="/resume" label={<Link to='/resume'>Résumé</Link>} onClick={this.resume.onClick} />
              <Tab to="/blog" label={<Link to='/blog'>Blog</Link>} onClick={this.blog.onClick} />
              <Tab to="/about" label={<Link to='/about'>About</Link>} onClick={this.about.onClick} />
            </Tabs>
          </Card>
        </div>
      </MuiThemeProvider>
    )
  }
}
export default NavBar

@@ -186,20 +186,24 @@
 import %7B
-Link
+Redirect
 %7D from %22
@@ -302,135 +302,8 @@
 ps)%0A
-    this.home =%0A    this.resume = %3CLink to='/resume'/%3E%0A    this.blog = %3CLink to='/blog'/%3E%0A    this.about = %3CLink to='/about'/%3E%0A
     
@@ -461,16 +461,44 @@
 ')%5B1%5D),%0A
+      buttonClicked: false,%0A
     %7D%0A  
@@ -575,28 +575,281 @@
 alue
-%7D)%0A  %7D%0A  render () %7B
+, buttonClicked: true%7D)%0A  %7D%0A  render () %7B%0A    var redirect = null;%0A    if (this.state.buttonClicked) %7B%0A      console.log('LINK ' + this.state.selection);%0A      redirect = %3CRedirect push to=%7Bthis.pageList%5Bthis.state.selection%5D%7D /%3E%0A    %7D%0A    this.state.buttonClicked = false;
 %0A   
@@ -897,16 +897,35 @@
 theme%7D%3E%0A
+        %7Bredirect%7D%0A
         
@@ -1399,34 +1399,14 @@
 bel=
-%7B%3CLink to='/'%3EHome%3C/Link%3E%7D
+'Home'
  onC
@@ -1415,25 +1415,36 @@
 ck=%7B
+()=%3E
 this.
-home.onClick
+state.selection='/'
 %7D /%3E
@@ -1486,42 +1486,16 @@
 bel=
-%7B%3CLink to='/resume'%3ER%C3%A9sum%C3%A9%3C/Link%3E%7D
+'R%C3%A9sum%C3%A9'
  onC
@@ -1504,27 +1504,42 @@
 ck=%7B
+()=%3E
 this.
-resume.onClick
+state.selection='/resume'
 %7D /%3E
@@ -1579,38 +1579,14 @@
 bel=
-%7B%3CLink to='/blog'%3EBlog%3C/Link%3E%7D
+'Blog'
  onC
@@ -1595,25 +1595,40 @@
 ck=%7B
+()=%3E
 this.
-blog.onClick
+state.selection='/blog'
 %7D /%3E
@@ -1669,40 +1669,15 @@
 bel=
-%7B%3CLink to='/about'%3EAbout%3C/Link%3E%7D
+'About'
  onC
@@ -1686,26 +1686,41 @@
 ck=%7B
+()=%3E
 this.
-about.onClick
+state.selection='/about'
 %7D /%3E

Add redirect links to the nav bar