Skip to content

Commit

Permalink
Price change 24hr
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyenlejoe committed Jan 12, 2024
1 parent b41935d commit 1e829b0
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/components/Organisms/XYK/XYKTokenListView/XYKTokenListView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { IconWrapper } from "@/components/Atoms/IconWrapper/IconWrapper";
import { GRK_SIZES } from "@/utils/constants/shared.constants";
import { useCovalent } from "@/utils/store/Covalent";
import { type XYKTokenListViewProps } from "@/utils/types/organisms.types";
import { BalancePriceDelta } from "@/components/Atoms/BalancePriceDelta/BalancePriceDelta";

export const XYKTokenListView: React.FC<XYKTokenListViewProps> = ({
chain_name,
Expand Down Expand Up @@ -218,6 +219,27 @@ export const XYKTokenListView: React.FC<XYKTokenListViewProps> = ({
);
},
},
{
id: "quote_rate_24h",
accessorKey: "quote_rate_24h",
header: ({ column }) => (
<TableHeaderSorting
align="right"
header_name={"Price Change (24hrs)"}
column={column}
/>
),
cell: ({ row }) => {
return (
<div className="text-right">
<BalancePriceDelta
numerator={row.original.quote_rate_24h}
denominator={row.original.quote_rate}
/>{" "}
</div>
);
},
},
{
id: "actions",
cell: ({ row }) => {
Expand Down

0 comments on commit 1e829b0

Please sign in to comment.