Skip to content

Commit

Permalink
feat: MET-2397 update
Browse files Browse the repository at this point in the history
  • Loading branch information
sotatek-huytran committed Nov 4, 2024
1 parent 71c6646 commit 835d18d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/TokenDetail/TokenTableData/TokenTransaction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ const TokenTransaction: React.FC<ITokenTransaction> = ({ tabActive, tokenId }) =
blockKey
);
const { error } = fetchData;

const onClickRow = (e: React.MouseEvent<Element, globalThis.MouseEvent>, r: Transactions) => {
if (e.target instanceof HTMLAnchorElement || (e.target instanceof Element && e.target.closest("a"))) {
e.preventDefault();
e.stopPropagation();
return;
}
history.push(details.transaction(r.hash));
};
const columns: Column<Transactions>[] = [
{
title: t("glossary.txhash"),
Expand Down Expand Up @@ -142,7 +151,7 @@ const TokenTransaction: React.FC<ITokenTransaction> = ({ tabActive, tokenId }) =
total: fetchData.total,
onChange: (page, size) => history.replace({ search: stringify({ page, size }) })
}}
onClickRow={(_, r: Transactions) => history.push(details.transaction(r.hash))}
onClickRow={onClickRow}
/>
</Box>
);
Expand Down

0 comments on commit 835d18d

Please sign in to comment.