aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/index.js')
-rw-r--r--vnext/src/index.js88
1 files changed, 46 insertions, 42 deletions
diff --git a/vnext/src/index.js b/vnext/src/index.js
index 88c13ae3..963aa968 100644
--- a/vnext/src/index.js
+++ b/vnext/src/index.js
@@ -6,6 +6,7 @@ import Discover from './components/Discover';
import Post from './components/Post';
import Thread from './components/Thread';
import LoginButton from './components/LoginButton';
+import Footer from './components/Footer';
class App extends React.Component {
constructor(props) {
@@ -16,49 +17,52 @@ class App extends React.Component {
}
render() {
return (
- <Router>
- <div className="wrapper">
- <header>
- <div id="header_wrapper">
- {this.state.visitor.uid > 0 ?
- <div id="ctitle">
- <a href="/{this.state.visitor.name}">
- <img src="//i.juick.com/a/{this.state.visitor.uid}.png" alt=""/>{this.state.visitor.name}
- </a>
- </div>
- :
- <div id="logo"><Link to="/">Juick</Link></div>
- }
- <div id="search">
- <form action="/">
- <input name="search" className="text"
- placeholder="Search..." />
- </form>
- </div>
- <nav id="global">
- <ul>
- {this.state.visitor.uid > 0 ?
- <li><Link to={{ pathname: '/'}}><Icon name="ei-comment" size="s"/>Discuss</Link></li>
- :
- <li><Link to='/?media=1' rel="nofollow"><Icon name="ei-camera" size="s"/>Photos</Link></li>
- }
- <li><Link to={{ pathname: '/'}} rel="nofollow"><Icon name="ei-search" size="s"/>Discover</Link></li>
- <li>
- {this.state.visitor.uid > 0 ?
- <Link to={{ pathname: '/post'}}><Icon name="ei-pencil" size="s"/>Post</Link>
- :
- <LoginButton title="Login" onAuth={this.auth.bind(this)} />
+ <React.Fragment>
+ <Router>
+ <div className="wrapper">
+ <header>
+ <div id="header_wrapper">
+ {this.state.visitor.uid > 0 ?
+ <div id="ctitle">
+ <a href="/{this.state.visitor.name}">
+ <img src="//i.juick.com/a/{this.state.visitor.uid}.png" alt="" />{this.state.visitor.name}
+ </a>
+ </div>
+ :
+ <div id="logo"><Link to="/">Juick</Link></div>
+ }
+ <div id="search">
+ <form action="/">
+ <input name="search" className="text"
+ placeholder="Search..." />
+ </form>
+ </div>
+ <nav id="global">
+ <ul>
+ {this.state.visitor.uid > 0 ?
+ <li><Link to={{ pathname: '/' }}><Icon name="ei-comment" size="s" />Discuss</Link></li>
+ :
+ <li><Link to='/?media=1' rel="nofollow"><Icon name="ei-camera" size="s" />Photos</Link></li>
}
- </li>
- </ul>
- </nav>
- </div>
- </header>
- <Route exact path="/" component={Discover} />
- <Route path="/:user/:mid" component={Thread} />
- <Route path="/post" component={Post} />
- </div>
- </Router>
+ <li><Link to={{ pathname: '/' }} rel="nofollow"><Icon name="ei-search" size="s" />Discover</Link></li>
+ <li>
+ {this.state.visitor.uid > 0 ?
+ <Link to={{ pathname: '/post' }}><Icon name="ei-pencil" size="s" />Post</Link>
+ :
+ <LoginButton title="Login" onAuth={this.auth.bind(this)} />
+ }
+ </li>
+ </ul>
+ </nav>
+ </div>
+ </header>
+ <Route exact path="/" component={Discover} />
+ <Route path="/:user/:mid" component={Thread} />
+ <Route path="/post" component={Post} />
+ </div>
+ </Router>
+ <Footer />
+ </React.Fragment>
)
}
auth(data) {