Skip to content

Commit 4c207aa

Browse files
committed
docs(coin-app): sub/unsub from same channel
1 parent 92872b0 commit 4c207aa

File tree

2 files changed

+15
-13
lines changed

2 files changed

+15
-13
lines changed

examples/coin-app/src/pages/AssetDetail/Stats.tsx

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,20 @@ export default function Stats({ id }: { id: string }) {
77
const stats = useSuspense(StatsResource.get, { id });
88
return (
99
<table>
10-
<tr>
11-
<th align="right">high</th>
12-
<td>{formatPrice.format(stats.high)}</td>
13-
</tr>
14-
<tr>
15-
<th align="right">low</th>
16-
<td>{formatPrice.format(stats.low)}</td>
17-
</tr>
18-
<tr>
19-
<th align="right">volume</th>
20-
<td>{formatLargePrice.format(stats.volume_usd)}</td>
21-
</tr>
10+
<tbody>
11+
<tr>
12+
<th align="right">high</th>
13+
<td>{formatPrice.format(stats.high)}</td>
14+
</tr>
15+
<tr>
16+
<th align="right">low</th>
17+
<td>{formatPrice.format(stats.low)}</td>
18+
</tr>
19+
<tr>
20+
<th align="right">volume</th>
21+
<td>{formatLargePrice.format(stats.volume_usd)}</td>
22+
</tr>
23+
</tbody>
2224
</table>
2325
);
2426
}

examples/coin-app/src/resources/Ticker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ export const getTicker = new RestEndpoint({
5353
urlPrefix: 'https://api.exchange.coinbase.com',
5454
path: '/products/:product_id/ticker',
5555
schema: Ticker,
56-
channel: 'ticker_batch',
56+
channel: 'ticker',
5757
});

0 commit comments

Comments
 (0)