Skip to content

Commit

Permalink
Merge pull request #9925 from Expensify/marco-fixLinks
Browse files Browse the repository at this point in the history
[NoQA] fix links for the Expensify Help site
  • Loading branch information
marcochavezf authored Jul 15, 2022
2 parents 6280b17 + 8b6c31f commit d2c03dc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/_includes/home-lhn.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ul class="lhn-items">
<li class="home-link">
<a href="/index.html">Home</a>
<div class="link" onclick="navigateToHome()">Home</div>
</li>
<li>
<div onclick="navigateTo('/hubs/send-money')" class="icon-with-link">
Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/request-money-lhn.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ul class="lhn-items">
<li class="home-link">
<a href="/index.html">Home</a>
<div class="link" onclick="navigateToHome()">Home</div>
</li>
<li>
<div onclick="navigateTo('/hubs/send-money')" class="icon-with-link">
Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/send-money-lhn.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<ul class="lhn-items">
<li class="home-link">
<a href="/index.html">Home</a>
<div class="link" onclick="navigateToHome()">Home</div>
</li>
<li>
<div class="icon-with-link selected">
Expand Down
16 changes: 11 additions & 5 deletions docs/assets/js/main.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@

function navigateTo(path) { // eslint-disable-line no-unused-vars
/* eslint-disable no-unused-vars */
function navigateTo(path) {
window.location.href = path;
}

function toggleHeaderMenu() { // eslint-disable-line no-unused-vars
function navigateToHome() {
// TODO: Change to '/index' when the site is live
navigateTo('/main');
}

function toggleHeaderMenu() {
const lhn = document.getElementById('lhn');
const lhnContent = document.getElementById('lhn-content');
const anguleUpIcon = document.getElementById('angle-up-icon');
Expand All @@ -23,11 +29,11 @@ function toggleHeaderMenu() { // eslint-disable-line no-unused-vars
}
}

function navigateBack() { // eslint-disable-line no-unused-vars
function navigateBack() {
if (window.location.pathname.includes('/request-money/')) {
window.location.href = '/hubs/request-money/';
window.location.href = '/hubs/request-money';
} else {
window.location.href = '/hubs/send-money/';
window.location.href = '/hubs/send-money';
}

// Add a little delay to avoid showing the previous content in a fraction of a time
Expand Down

0 comments on commit d2c03dc

Please sign in to comment.