Skip to content

Commit 706b5f7

Browse files
authored
fix: rename strategy vault info page
## Why Strategy vault details are provider-agnostic and should use a clearer, stable `/info` URL. ## Lessons learnt Changing a public subpage route also requires updating the strategy navigation and sitemap. ## Summary - Renamed the strategy vault details route to `/info`. - Updated the page metadata to use the strategy name without mentioning Enzyme. - Updated navigation and sitemap links.
1 parent 031d5fd commit 706b5f7

4 files changed

Lines changed: 8 additions & 7 deletions

File tree

src/routes/strategies/[strategy=apiStrategy]/StrategyNav.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
label: 'Performance'
4242
},
4343
{
44-
slug: 'vault',
44+
slug: 'info',
4545
label: 'Vault info'
4646
},
4747
{
@@ -121,7 +121,7 @@
121121
switch (slug) {
122122
case currentOption?.slug : return true;
123123
case 'frozen-positions' : return hasFrozenPositions;
124-
case 'vault' : return hasVault;
124+
case 'info' : return hasVault;
125125
case 'fees' : return hasVault;
126126
case 'backtest' : return backtestAvailable;
127127
default : return true;

src/routes/strategies/[strategy=apiStrategy]/vault/+page.svelte renamed to src/routes/strategies/[strategy=apiStrategy]/info/+page.svelte

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!--
2-
Page to display vault information.
2+
@component
3+
Displays blockchain information for a strategy vault.
34
-->
45
<script lang="ts">
56
import { page } from '$app/state';
@@ -16,8 +17,8 @@
1617
let { data } = $props();
1718
let { chain, strategy, vault } = $derived(data);
1819
19-
let title = $derived(`Enzyme vault | ${strategy.name} | Trading Strategy`);
20-
let description = $derived(`Enzyme vault information for ${strategy.name} strategy`);
20+
let title = $derived(`${strategy.name} info | Trading Strategy`);
21+
let description = $derived(`Information for ${strategy.name} strategy`);
2122
let pageUrl = $derived(new URL(page.url.pathname, page.url.origin).href);
2223
</script>
2324

src/routes/strategies/[strategy=apiStrategy]/vault/+page.ts renamed to src/routes/strategies/[strategy=apiStrategy]/info/+page.ts

File renamed without changes.

src/routes/strategies/sitemap.xml/+server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { SitemapStream } from 'sitemap';
55
import { getCachedStrategies } from 'trade-executor/client/strategy-info';
66

77
// see StrategyNav menuOptions
8-
// also see special-case vault and backtest pages below
8+
// also see special-case info and backtest pages below
99
const strategyPages = [
1010
'',
1111
'description',
@@ -33,7 +33,7 @@ export async function GET({ fetch, setHeaders, url }) {
3333
const pages = [...strategyPages];
3434

3535
if (strategy.on_chain_data?.asset_management_mode === 'enzyme') {
36-
pages.push('vault');
36+
pages.push('info');
3737
}
3838

3939
if (strategy.backtest_available) {

0 commit comments

Comments
 (0)