Fix bug with additional slash appended when switching languages.
This commit is contained in:
parent
baf3aff44b
commit
447561179b
@ -8,7 +8,7 @@ import './Navigation.css';
|
|||||||
|
|
||||||
function generatePath(language) {
|
function generatePath(language) {
|
||||||
const currentPath = window.location.pathname;
|
const currentPath = window.location.pathname;
|
||||||
return `/${language}${currentPath.substring(currentPath.indexOf('/', 1))}/`;
|
return `/${language}${currentPath.substring(currentPath.indexOf('/', 1))}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Navigation = () => {
|
const Navigation = () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user