Skip to content

Commit b9a82f7

Browse files
committed
Flux - 19 - React Router Helpers
1 parent 6680a3a commit b9a82f7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

imgur-client/sass/header.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.header {
2+
.active {
3+
font-weight: 900;
4+
}
5+
}

imgur-client/src/components/header.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.exports = React.createClass({
3232
renderTopics: function() {
3333
return this.state.topics.slice(0, 4).map(function(topic){
3434
return <li key={topic.id}>
35-
<Link to={"topics/" + topic.id}>
35+
<Link activeClassName="active" to={"topics/" + topic.id}>
3636
{topic.name}
3737
</Link>
3838
</li>

0 commit comments

Comments
 (0)