aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/app.js')
-rw-r--r--vnext/src/app.js21
1 files changed, 16 insertions, 5 deletions
diff --git a/vnext/src/app.js b/vnext/src/app.js
index 82209e45..1f323b51 100644
--- a/vnext/src/app.js
+++ b/vnext/src/app.js
@@ -4,6 +4,8 @@ import { BrowserRouter as Router, Route, Link } from "react-router-dom"
import Discover from "./components/Discover"
import Post from "./components/Post"
+import Thread from "./components/Thread"
+import LoginButton from "./components/LoginButton"
class App extends React.Component {
constructor(props) {
@@ -22,12 +24,17 @@ class App extends React.Component {
<nav id="global">
<ul>
{this.state.visitor.uid ?
- <li><Link to="/?show=discuss"><i data-icon="ei-comment" data-size="s"></i>Discuss</Link></li>
+ <li><Link to={{ pathname: "/", search: "?show=discuss"}}><i data-icon="ei-comment" data-size="s"></i>Discuss</Link></li>
:
- <li><Link to="/?show=photos" rel="nofollow"><i data-icon="ei-camera" data-size="s"></i>Photos</Link></li>
+ <li><Link to={{ pathname: "/", search: "?media=1"}} rel="nofollow"><i data-icon="ei-camera" data-size="s"></i>Photos</Link></li>
}
- <li><Link to="/?show=all" rel="nofollow"><i data-icon="ei-search" data-size="s"></i>Discover</Link></li>
- <li><Link to="post" href="/post"><i data-icon="ei-pencil" data-size="s"></i>Post</Link>
+ <li><Link to="/" rel="nofollow"><i data-icon="ei-search" data-size="s"></i>Discover</Link></li>
+ <li>
+ {this.state.visitor.uid ?
+ <Link to="post" href="/post"><i data-icon="ei-pencil" data-size="s"></i>Post</Link>
+ :
+ <LoginButton title="Login" onAuth={this.auth.bind(this)} />
+ }
</li>
</ul>
</nav>
@@ -40,11 +47,15 @@ class App extends React.Component {
</div>
</header>
<Route exact path="/" component={Discover} />
- <Route path="/post" component={Post} />
+ <Route path="/:user/:mid" component={Thread} />
+ <Route path="/post" component={Post} />
</div>
</Router>
)
}
+ auth(data) {
+ console.log(data)
+ }
}