force user to go to new jamtracks page (beta) once user clicks the JamTracks tile in client home page

This commit is contained in:
Nuwan 2025-01-18 15:26:36 +05:30
parent 1c47c70d35
commit ccf3b3b5e7
3 changed files with 25 additions and 0 deletions

View File

@ -352,6 +352,18 @@
return;
}
//force user to new jamtrack page (beta site)
if(hash && hash == '#/jamtrack') {
var urlToOpen = gon.spa_origin + '/jamtracks';
if(gon.isNativeClient) {
context.JK.popExternalLink(urlToOpen);
}else{
context.location.href = urlToOpen;
}
hash = '#/home';
}
var url = '/client#/' + screen;
if (hash) {
url = hash;

View File

@ -482,6 +482,18 @@
var destination = $(evt.currentTarget).attr('layout-link');
var $destination = $('[layout-id="' + destination + '"]');
//force user to the new site if they click on the jamtrack tile
if(destination === "jamtrack") {
var urlToOpen = gon.spa_origin + '/jamtracks';
if(gon.isNativeClient) {
context.JK.popExternalLink(urlToOpen);
return;
}else{
window.open(urlToOpen, '_blank');
return;
}
}
var destinationType = $destination.attr("layout");
if (destinationType === "screen") {
if(!context.JK.currentUserId && !$destination.is('.no-login-required')) {

View File

@ -89,5 +89,6 @@ module ClientHelper
gon.use_cached_session_scores = Rails.application.config.use_cached_session_scores
gon.allow_both_find_algos = Rails.application.config.allow_both_find_algos
gon.stripe_publishable_key = Rails.application.config.stripe[:publishable_key]
gon.spa_origin = Rails.application.config.spa_origin
end
end