File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33 import { slide } from ' svelte/transition' ;
44 import { flip } from ' svelte/animate' ;
55 import { cubicOut } from ' svelte/easing' ;
6- import { Alert , Button , Section } from ' $lib/components' ;
6+ import Alert from ' $lib/components/Alert.svelte' ;
7+ import Button from ' $lib/components/Button.svelte' ;
8+ import Section from ' $lib/components/Section.svelte' ;
79 import {
810 type ChainOption ,
911 default as ChainFilter ,
1315 import StrategyTile from ' ./strategies/StrategyTile.svelte' ;
1416 import { getStrategyChartDateRange } from ' trade-executor/helpers/chart' ;
1517
16- export let strategies: StrategyInfo [];
18+ interface Props {
19+ strategies: StrategyInfo [];
20+ }
21+
22+ let { strategies }: Props = $props ();
1723
18- let selected: ChainOption = ' all' ;
24+ let selected: ChainOption = $state ( ' all' ) ;
1925
20- $ : filteredStrategies = strategies .filter ((s ) => matchesChainOption (s , selected ));
26+ let filteredStrategies = $derived ( strategies .filter ((s ) => matchesChainOption (s , selected ) ));
2127
2228 const chartDateRange = getStrategyChartDateRange (strategies );
2329 </script >
Original file line number Diff line number Diff line change 33 import { chains } from ' $lib/helpers/chain' ;
44 import { getLogoUrl } from ' $lib/helpers/assets' ;
55 import { formatAmount , formatDollar } from ' $lib/helpers/formatters' ;
6+ import Button from ' $lib/components/Button.svelte' ;
67
78 let { impressiveNumbers } = $props ();
89
1314 {#if chains }
1415 <h2 >Trading Strategy runs on</h2 >
1516 <div class =" chains" >
16- {#each indexedChains as chain (chain .id )}
17- <a class ="tile b" title ={chain .name } href ="/trading-view/ {chain .slug }" data-sveltekit-preload-data >
18- <img src ={getLogoUrl (' blockchain' , chain .slug )} alt ={chain .name } />
19- </a >
20- {/each }
17+ <div class =" chain-logos" >
18+ {#each indexedChains as chain (chain .id )}
19+ <a class ="tile b" title ={chain .name } href ="/trading-view/ {chain .slug }" data-sveltekit-preload-data >
20+ <img src ={getLogoUrl (' blockchain' , chain .slug )} alt ={chain .name } />
21+ </a >
22+ {/each }
23+ </div >
24+ <Button class =" chain-button" secondary label =" See all chains" href =" /trading-view/blockchains" />
2125 </div >
2226 {/if }
2327
5559 }
5660
5761 .chains {
62+ display : grid ;
63+ gap : 2rem ;
64+
65+ :global(.chain-button) {
66+ justify-self : center ;
67+ }
68+ }
69+
70+ .chain-logos {
5871 display : grid ;
5972 grid-template-columns : repeat (8 , auto );
6073 gap : 2rem 0 ;
You can’t perform that action at this time.
0 commit comments