diff --git a/src/components/transactions/TransactionConciseMetadata.less b/src/components/transactions/TransactionConciseMetadata.less index 24288a8..922e241 100644 --- a/src/components/transactions/TransactionConciseMetadata.less +++ b/src/components/transactions/TransactionConciseMetadata.less @@ -14,3 +14,9 @@ user-select: none; } } + +a.transaction-concise-metadata { + &:hover, &:active, &:focus { + color: @text-color; + } +} diff --git a/src/components/transactions/TransactionConciseMetadata.tsx b/src/components/transactions/TransactionConciseMetadata.tsx index a48963d..f387b07 100644 --- a/src/components/transactions/TransactionConciseMetadata.tsx +++ b/src/components/transactions/TransactionConciseMetadata.tsx @@ -3,6 +3,8 @@ // Full details: https://github.com/tmpim/KristWeb2/blob/master/LICENSE.txt import classNames from "classnames"; +import { Link } from "react-router-dom"; + import { KristTransaction } from "@api/types"; import { useNameSuffix, stripNameFromMetadata } from "@utils/krist"; @@ -19,15 +21,20 @@ * Trims the name and metaname from the start of metadata, and truncates it * to a specified amount of characters. */ -export function TransactionConciseMetadata({ transaction, metadata, limit = 30, className }: Props): JSX.Element | null { +export function TransactionConciseMetadata({ + transaction: tx, + metadata, + limit = 30, + className +}: Props): JSX.Element | null { const nameSuffix = useNameSuffix(); // Don't render anything if there's no metadata (after the hooks) - const meta = metadata || transaction?.metadata; + const meta = metadata || tx?.metadata; if (!meta) return null; // Strip the name from the start of the transaction metadata, if it is present - const hasName = transaction && (transaction.sent_name || transaction.sent_metaname); + const hasName = tx && (tx.sent_name || tx.sent_metaname); const withoutName = hasName ? stripNameFromMetadata(nameSuffix, meta) : meta; @@ -40,5 +47,15 @@ "transaction-concise-metadata-truncated": wasTruncated }); - return {truncated}; + // Link to the transaction if it is available + return tx + ? ( + + {truncated} + + ) + : {truncated}; } diff --git a/src/pages/transactions/TransactionsTable.tsx b/src/pages/transactions/TransactionsTable.tsx index 416258b..20c5bb9 100644 --- a/src/pages/transactions/TransactionsTable.tsx +++ b/src/pages/transactions/TransactionsTable.tsx @@ -82,6 +82,7 @@ // Don't allow sorting by ID to save a bit of width in the columns; // it's equivalent to sorting by time anyway }, + // Type { title: tStr("columnType"), @@ -106,6 +107,7 @@ sorter: true }, + // To { title: tStr("columnTo"),