From 8c1c5f10cc987f1c65a245a905e6ee696aede4fc Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 30 Jan 2016 00:18:23 +0000 Subject: [PATCH] add more urls --- static/src/js/components/index/project-image.js | 3 ++- static/src/js/components/index/project-images-main.js | 3 ++- static/src/js/helpers/reverser.js | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/static/src/js/components/index/project-image.js b/static/src/js/components/index/project-image.js index b31212a..bed2190 100644 --- a/static/src/js/components/index/project-image.js +++ b/static/src/js/components/index/project-image.js @@ -14,7 +14,8 @@ export default class ProjectImage extends React.Component { if (this.props.data.link.startsWith('#')) { this.setState({url: this.props.data.link}); } else { - Reverser(this.props.data.link) + const args = this.props.data.args || false; + Reverser(this.props.data.link, args) .then(function (url) { this.setState({ url }); }.bind(this)) diff --git a/static/src/js/components/index/project-images-main.js b/static/src/js/components/index/project-images-main.js index 88336f8..e4b1f62 100644 --- a/static/src/js/components/index/project-images-main.js +++ b/static/src/js/components/index/project-images-main.js @@ -12,7 +12,8 @@ const DATA = [ { title: 'BSOD-Enabler', text: 'Ever wanted to bring up a Blue Screen of Death on command, well now you can!', - link: '', + link: 'projects:project', + args: 'bsod-enabler' }, { title: 'Yoga Pal', diff --git a/static/src/js/helpers/reverser.js b/static/src/js/helpers/reverser.js index e4420e5..76f9b57 100644 --- a/static/src/js/helpers/reverser.js +++ b/static/src/js/helpers/reverser.js @@ -2,9 +2,9 @@ export default function Reverser(ident, args) { let body = {}; if (ident) { body.ident = ident; - } - if (args) { - body.args = args; + if (args) { + body.args = args; + } } body = JSON.stringify(body); return fetch('/reverse/', {