diff --git a/static/src/js/components/navbar/item.js b/static/src/js/components/navbar/item.js
index 059066e..03e2984 100644
--- a/static/src/js/components/navbar/item.js
+++ b/static/src/js/components/navbar/item.js
@@ -1,29 +1,9 @@
import React from 'react';
-import Reverser from '../../helpers/reverser';
export default class Item extends React.Component {
- constructor() {
- super();
- this.state = {
- url: '#'
- };
- }
-
- componentDidMount() {
- if (!this.props.href && !this.props.ident) {
- return;
- }
-
- if (this.props.href) {
- this.setState({url: this.props.href});
- } else {
- Reverser(this.props.ident, this.props.args, function (url) {
- this.setState({ url });
- }.bind(this));
- }
- }
render() {
+ const href = this.props.href.endsWith('/') ? this.props.href : this.props.href + '/';
let icon;
if (this.props.icon) {
if (this.props.icon.startsWith('ion')) {
@@ -37,7 +17,7 @@ export default class Item extends React.Component {
}
}
return (
-
{icon}{this.props.children}
+ {icon}{this.props.children}
);
}
}
diff --git a/static/src/js/components/navbar/navbar.js b/static/src/js/components/navbar/navbar.js
index dfa19bd..30af956 100644
--- a/static/src/js/components/navbar/navbar.js
+++ b/static/src/js/components/navbar/navbar.js
@@ -18,14 +18,15 @@ export default class NavBar extends React.Component {
- - Pithos
- - BSOD Enabler
+ - Pithos
+ - BSOD Enabler
- Hipchat Emoticons for All
+ href="/projects/hipchat-emoticons-for-all/"
+ icon="ion-chatbox-working">
+ Hipchat Emoticons for All
+
- Custom PC
- - All Projects...
+ - All Projects...
- Code Challenges
@@ -33,9 +34,9 @@ export default class NavBar extends React.Component {
- The Wiki Game Solver
- - Student Robotics
- - Attack on Blocks Game
- - Student Server
+ - Student Robotics
+ - Attack on Blocks Game
+ - Student Server
- EPQ
- Wall of Sheep
@@ -61,9 +62,8 @@ export default class NavBar extends React.Component {
- Links
- - Me
- - Website
- - Contact Me
+ - Me
+ - Website
diff --git a/static/src/js/helpers/reverser.js b/static/src/js/helpers/reverser.js
deleted file mode 100644
index 9baf18f..0000000
--- a/static/src/js/helpers/reverser.js
+++ /dev/null
@@ -1,33 +0,0 @@
-export default function Reverser(ident, args, onSuccess) {
- let body = {};
- if (ident) {
- body.ident = ident;
- if (args) {
- body.args = args;
- }
- }
- if (body !== {}) {
- body = JSON.stringify(body);
- fetch('/reverse/', {
- method: 'post',
- headers: {
- 'Accept': 'application/json',
- 'Content-Type': 'application/json'
- },
- body
- }).then(function (response) {
- if (response.status === 302) {
- return response;
- } else {
- var error = new Error(response.statusText);
- error.response = response;
- throw error;
- }
- }).then(
- (response) => response.json()
- ).then(onSuccess)
- .catch(function (err) {
- console.log(err);
- });
- }
-}