landing-page: Show correct pricing tab based on context.

This commit is contained in:
Aman Agrawal 2023-12-19 06:40:23 +00:00 committed by Tim Abbott
parent a37354f92a
commit 48af342bd8
1 changed files with 4 additions and 2 deletions

View File

@ -138,8 +138,10 @@ $(() => {
if (window.location.pathname.endsWith("/plans/")) {
const tabs = ["#cloud", "#self-hosted"];
// Default to showing the #cloud tab
let tab_to_show = "#cloud";
// Show the correct tab based on context.
let tab_to_show = $(".portico-pricing").hasClass("showing-self-hosted")
? "#self-hosted"
: "#cloud";
const target_hash = window.location.hash;
// Capture self-hosted-based fragments, such as