Skip to content

Commit

Permalink
chore: always redirect to explorer
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc committed Mar 9, 2022
1 parent e3bafcf commit 326406b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
16 changes: 0 additions & 16 deletions app/assets/v2/js/grants/_detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,17 +124,6 @@ Vue.mixin({

}).catch(console.error);
},
backNavigation: function() {
const vm = this;
const lgt = localStorage.getItem('last_grants_title') || 'Grants';

const lgi = (document.referrer.indexOf(location.host) != -1 && !document.referrer.includes('grants/new')) ? 'javascript:history.back()' : '/grants/explorer';

if (lgi && lgt) {
vm.$set(vm.backLink, 'url', lgi);
vm.$set(vm.backLink, 'title', lgt);
}
},
scrollToElement(element) {
const container = this.$refs[element];

Expand Down Expand Up @@ -174,15 +163,10 @@ if (document.getElementById('gc-grant-detail')) {
grant: {},
tabSelected: 0,
tab: null,
backLink: {
url: '/grants',
title: 'Grants'
}
};
},
mounted: function() {
this.enableTab();
this.backNavigation();
this.fetchGrantDetails();
}
});
Expand Down
2 changes: 1 addition & 1 deletion app/grants/templates/grants/detail/_index.html
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ <h2 class="font-bigger-1 font-weight-bold mb-3">
<grant-details :grant="grant" v-if="grant?.id">
<img :src="grant.logo_url" alt="" height="290px" class="d-block w-100 mb-4" style="object-fit: contain; background: black;" :style="grant.image_css">
<div class="container mb-3">
<a :href="backLink.url" class="font-body" rel="noopener noreferrer"><i class="fas fa-chevron-left mr-2"></i>Back to [[backLink.title]] </a>
<a href="/grants/explorer" class="font-body" rel="noopener noreferrer"><i class="fas fa-chevron-left mr-2"></i>Back to Grants </a>
</div>
</grant-details>

Expand Down

0 comments on commit 326406b

Please sign in to comment.