Remove extra url reversing
This commit is contained in:
parent
332b5446c6
commit
8a404b02a8
4 changed files with 5 additions and 4 deletions
|
@ -2,7 +2,8 @@ import React from 'react';
|
|||
|
||||
export default class Breadcrumbs extends React.Component {
|
||||
render() {
|
||||
const urlParts = Object.freeze(location.pathname.split('/').slice(1, -1));
|
||||
const loc = location.pathname.endsWith('/') ? location.pathname.slice(0, -1) : location.pathname;
|
||||
const urlParts = Object.freeze(loc.split('/').slice(1));
|
||||
if (urlParts.length < 2) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<p class="triple">
|
||||
<a href="{% url 'about:index' %}">About</a> |
|
||||
<a href="/about/">About</a> |
|
||||
<a href="https://github.com/RealOrangeOne/theorangeone.net" target="_blank">View Source</a> |
|
||||
<a href="">Contact</a>
|
||||
<p>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
It's not often someone will need to decode text into morse code (and visa-versa), but if I had something like this when I needed it, it would have saved me hours of time!
|
||||
|
||||
I originally wrote this code for the [Student Robotics 2015]({% url 'robotics:2015-index' %}) Entry, to convert a string message into a morse code message that would be transmitted using LEDs, for aestetics and debugging. Unfortunately due to a fixed time frame, this idea was scraped before it could be fully implemented. Fortunately the decoder worked perfectly!
|
||||
I originally wrote this code for the [Student Robotics 2015](/robotics/2015/) Entry, to convert a string message into a morse code message that would be transmitted using LEDs, for aestetics and debugging. Unfortunately due to a fixed time frame, this idea was scraped before it could be fully implemented. Fortunately the decoder worked perfectly!
|
||||
|
||||
|
||||
## Usage
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Testing
|
||||
This page is for testing only.
|
||||
|
||||
Please [check out my other projects]({% url 'projects:all' %}).
|
||||
Please [check out my other projects](/projects/all).
|
||||
|
|
Reference in a new issue