diff --git a/website/src/lib/components/self/AppSidebar.svelte b/website/src/lib/components/self/AppSidebar.svelte index 51ad729..62c6e55 100644 --- a/website/src/lib/components/self/AppSidebar.svelte +++ b/website/src/lib/components/self/AppSidebar.svelte @@ -93,10 +93,14 @@ setOpenMobile(false); } - async function handleTradeClick(coinSymbol: string) { - const targetPath = `/coin/${coinSymbol.toLowerCase()}`; - - await goto(targetPath, { invalidateAll: true }); + async function handleTradeClick(coinSymbol: string, trade: any) { + if (trade.type === 'TRANSFER_IN' || trade.type === 'TRANSFER_OUT') { + const targetPath = `/user/${trade.username}`; + await goto(targetPath, { invalidateAll: true }); + } else { + const targetPath = `/coin/${coinSymbol.toLowerCase()}`; + await goto(targetPath, { invalidateAll: true }); + } setOpenMobile(false); } @@ -252,7 +256,7 @@ {:else} {#each $liveTradesStore.slice(0, 5) as trade, index (`${trade.timestamp}-${trade.username}-${trade.coinSymbol}-${index}`)}