Skip to content

Commit

Permalink
docs(demo): Fix coin-app stats component
Browse files Browse the repository at this point in the history
  • Loading branch information
ntucker committed Aug 4, 2024
1 parent 8286ded commit fab2377
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/coin-app/src/pages/AssetDetail/Stats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { StatsResource } from 'resources/Stats';

import { formatPrice, formatLargePrice } from '../../components/formatPrice';

export default function Stats({ id }: { id: string }) {
const stats = useSuspense(StatsResource.get, { id });
export default function Stats({ product_id }: { product_id: string }) {
const stats = useSuspense(StatsResource.get, { product_id });
return (
<table>
<tbody>
Expand Down
2 changes: 1 addition & 1 deletion examples/coin-app/src/pages/AssetDetail/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function AssetDetail({ id }: { id: string }) {
</header>
<AssetChart product_id={`${currency.id}-USD`} />
<StatSection>
<Stats id={`${currency.id}-USD`} />
<Stats product_id={`${currency.id}-USD`} />
</StatSection>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion examples/coin-app/src/routing/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const routes: Route<Controller>[] = [
await Promise.allSettled([
controller.fetchIfStale(getTicker, { product_id }),
controller.fetchIfStale(CurrencyResource.get, { id }),
controller.fetchIfStale(StatsResource.get, { id: product_id }),
controller.fetchIfStale(StatsResource.get, { product_id }),
]);
},
},
Expand Down

0 comments on commit fab2377

Please sign in to comment.