Skip to content

Commit e0eb122

Browse files
author
Pantheon Builder
committed
fix: Hash-based tab navigation for direct page access
- Added handleHash() function to read URL hash on page load - /trades now opens dashboard with Trades tab active - /income opens Income tab, /streams opens Streams tab, etc. - Added hashchange event listener for browser back/forward - Each /page now correctly shows its corresponding tab
1 parent 72b3526 commit e0eb122

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

public/pantheon.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,19 @@ <h1 class="hero-title">Forge Decisions<br>At Battle Speed.</h1>
370370
function enterPantheon() {
371371
showSection('overview');
372372
}
373+
374+
// Handle URL hash for direct tab access
375+
function handleHash() {
376+
const hash = window.location.hash.replace('#', '');
377+
if (hash && ['overview', 'trades', 'streams', 'income', 'integrate', 'vault'].includes(hash)) {
378+
showSection(hash);
379+
} else {
380+
showSection('overview');
381+
}
382+
}
383+
384+
// Listen for hash changes
385+
window.addEventListener('hashchange', handleHash);
373386

374387
// Load overview data
375388
async function loadOverview() {
@@ -513,7 +526,7 @@ <h1 class="hero-title">Forge Decisions<br>At Battle Speed.</h1>
513526
// Init
514527
document.addEventListener('DOMContentLoaded', () => {
515528
console.log('✅ Pantheon loaded');
516-
loadOverview();
529+
handleHash();
517530
loadCombatLog();
518531
});
519532
</script>

0 commit comments

Comments
 (0)