+ {prettifyCurrency(row.original.volume_7d_quote)}
+
+ ),
},
{
id: "quote_rate",
accessorKey: "quote_rate",
header: ({ column }) => (
-
align="right"
- header_name={"Quote Rate"}
+ header={"Quote Rate"}
column={column}
/>
),
- cell: ({ row }) => {
- return (
-
- {" "}
- {prettifyCurrency(
- row.getValue("quote_rate"),
- 2,
- "USD",
- true
- )}{" "}
-
- );
- },
+ cell: ({ row }) => (
+
+ {prettifyCurrency(
+ row.getValue("quote_rate"),
+ 2,
+ "USD",
+ true
+ )}
+
+ ),
},
{
id: "fee_24h_quote",
accessorKey: "fee_24h_quote",
header: ({ column }) => (
-
align="right"
- header_name={"Fees (24hrs)"}
+ header={"Fees (24 hours)"}
column={column}
/>
),
- cell: ({ row }) => {
- const valueFormatted = prettifyCurrency(
- row.original.fee_24h_quote
- );
-
- return {valueFormatted}
;
- },
+ cell: ({ row }) => (
+
+ {prettifyCurrency(row.original.fee_24h_quote)}
+
+ ),
},
{
id: "annualized_fee",
accessorKey: "annualized_fee",
header: ({ column }) => (
-
- ),
- cell: ({ row }) => {
- const valueFormatted = calculateFeePercentage(
- +row.original.annualized_fee
- );
-
- return (
-
- 0 && "text-green-600"
- }`}
- >
- {valueFormatted}
-
- );
- },
- },
- {
- id: "actions",
- cell: ({ row }) => {
- return (
-
-
-
-
-
-
- Actions
- {
- if (on_pool_click) {
- on_pool_click(
- row.original.exchange
- );
- }
- }}
- className="cursor-pointer"
- >
- {" "}
- View Pool
-
-
-
-
- );
- },
- },
- ];
-
- const mobile_columns: ColumnDef[] = [
- {
- id: "contract_name",
- accessorKey: "contract_name",
- header: ({ column }) => (
-
- ),
- cell: ({ row }) => {
- const token_0 = row.original.token_0;
- const token_1 = row.original.token_1;
- const pool = `${token_0.contract_ticker_symbol}/${token_1.contract_ticker_symbol}`;
-
- return (
-
- );
- },
- },
- {
- id: "total_liquidity_quote",
- accessorKey: "total_liquidity_quote",
- header: ({ column }) => (
-
align="right"
- header_name={"Liquidity"}
+ header={"1 year Fees / Liquidity"}
column={column}
/>
),
- cell: ({ row }) => {
- const valueFormatted = prettifyCurrency(
- row.original.total_liquidity_quote
- );
-
- return {valueFormatted}
;
- },
- },
- {
- id: "total_volume_24h_quote",
- accessorKey: "total_volume_24h_quote",
- header: ({ column }) => (
-
+ cell: ({ row }) => (
+
+ 0 && "text-green-600"
+ }`}
+ >
+ {calculateFeePercentage(+row.original.annualized_fee)}
+
),
- cell: ({ row }) => {
- const valueFormatted = prettifyCurrency(
- row.original.volume_24h_quote
- );
-
- return {valueFormatted}
;
- },
},
{
id: "actions",
- cell: ({ row }) => {
- return (
-
-
-
-
-
-
- Actions
- {
- if (on_pool_click) {
- on_pool_click(
- row.original.exchange
- );
- }
- }}
- >
- {" "}
- View Pool
-
-
-
-
- );
- },
+ cell: ({ row }) => (
+
+
+
+
+
+
+ Actions
+ {
+ if (on_pool_click) {
+ on_pool_click(row.original.exchange);
+ }
+ }}
+ className="cursor-pointer"
+ >
+ {" "}
+ View Pool
+
+
+
+
+ ),
},
];
return (
- columns={windowWidth < 700 ? mobile_columns : columns}
+ columns={columns}
errorMessage={errorMessage}
maybeData={maybeResult}
sorting_state={[
diff --git a/src/components/Organisms/XYK/XYKPoolTransactionsListView/XYKPoolTransactionsListView.tsx b/src/components/Organisms/XYK/XYKPoolTransactionsListView/XYKPoolTransactionsListView.tsx
index d4268778..60da4cb2 100644
--- a/src/components/Organisms/XYK/XYKPoolTransactionsListView/XYKPoolTransactionsListView.tsx
+++ b/src/components/Organisms/XYK/XYKPoolTransactionsListView/XYKPoolTransactionsListView.tsx
@@ -63,29 +63,24 @@ export const XYKPoolTransactionsListView: React.FC<
const columns: ColumnDef[] = [
{
accessorKey: "block_signed_at",
+ id: "block_signed_at",
header: ({ column }) => (
-
+
+ align="left"
+ header={"Signed at"}
+ column={column}
+ />
),
- cell: ({ row }) => {
- const t = row.getValue("block_signed_at") as string;
-
- return (
- {timestampParser(t, "relative")}
- );
- },
+ cell: ({ row }) =>
+ timestampParser(row.getValue("block_signed_at"), "relative"),
},
{
accessorKey: "act",
+ id: "act",
header: ({ column }) => (
-
align="left"
- header_name={"Transaction type"}
+ header={"Transaction Type"}
column={column}
/>
),
@@ -158,26 +153,24 @@ export const XYKPoolTransactionsListView: React.FC<
},
},
{
- id: "total_quote",
accessorKey: "total_quote",
+ id: "total_quote",
header: ({ column }) => (
-
align="left"
- header_name={"Total value"}
+ header={"Total value"}
column={column}
/>
),
- cell: ({ row }) => {
- return <>{row.original.pretty_total_quote}>;
- },
+ cell: ({ row }) => row.original.pretty_total_quote,
},
{
- id: "amount_0",
accessorKey: "amount_0",
+ id: "amount_0",
header: ({ column }) => (
-
align="left"
- header_name={"Token Amount"}
+ header={"Token Amount"}
column={column}
/>
),
@@ -214,12 +207,12 @@ export const XYKPoolTransactionsListView: React.FC<
},
},
{
- id: "amount_1",
accessorKey: "amount_1",
+ id: "amount_1",
header: ({ column }) => (
-
align="left"
- header_name={"Token Amount"}
+ header={"Token Amount"}
column={column}
/>
),
diff --git a/src/components/Organisms/XYK/XYKTokenListView/XYKTokenListView.tsx b/src/components/Organisms/XYK/XYKTokenListView/XYKTokenListView.tsx
index 682462e4..f51e3c8f 100644
--- a/src/components/Organisms/XYK/XYKTokenListView/XYKTokenListView.tsx
+++ b/src/components/Organisms/XYK/XYKTokenListView/XYKTokenListView.tsx
@@ -35,18 +35,6 @@ export const XYKTokenListView: React.FC = ({
const [maybeResult, setResult] = useState