Skip to content

Commit

Permalink
fix: resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
sotatek-huytran committed Nov 8, 2024
1 parent 898ce05 commit a2b24df
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/EpochDetail/EpochBlockList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ const EpochBlockList: React.FC<IEpochBlockList> = ({ epochId }) => {

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.block(r.blockNo || r.hash));
};

const columns: Column<BlockDetail>[] = [
{
title: <div data-testid="epochList.blockTitle">{t("glossary.block")}</div>,
Expand Down Expand Up @@ -138,7 +147,7 @@ const EpochBlockList: React.FC<IEpochBlockList> = ({ epochId }) => {
total: fetchData.total,
onChange: (page, size) => history.replace({ search: stringify({ page, size }) })
}}
onClickRow={(_, r) => history.push(details.block(r.blockNo || r.hash))}
onClickRow={onClickRow}
/>
</Card>
</StyledContainer>
Expand Down

0 comments on commit a2b24df

Please sign in to comment.