Skip to content

Commit 925875d

Browse files
authored
Merge pull request #11 from icon-project/develop_missing-chains-handler
Missing chains handler And Cosmos details page URL update
2 parents 266adfc + ebda9f9 commit 925875d

File tree

4 files changed

+764
-92
lines changed

4 files changed

+764
-92
lines changed

src/components/CosmosProposalsTable.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react';
22
import { convertTimestampToDateTime } from '../utils/dateTimeUtils';
33
import { Proposal } from '../@types/CosmosProposalsTypes';
44
import { Link } from 'react-router-dom';
5+
import { useAppContext } from '../context/AppContext';
56

67
interface CosmosProposalsPageProps {
78
proposals: Proposal[];
@@ -21,7 +22,8 @@ const CosmosProposalsPage: React.FC<CosmosProposalsPageProps> = ({
2122
executeAction,
2223
}) => {
2324
const currentPage = parseInt(`${offset / limit}`) + 1;
24-
25+
const { state } = useAppContext();
26+
const chainName = state.activeCosmosChain.chainName;
2527

2628
return (
2729
<>
@@ -61,7 +63,7 @@ const CosmosProposalsPage: React.FC<CosmosProposalsPageProps> = ({
6163
</div>
6264
</td>
6365
<td>
64-
<Link to={`/cosmos/proposals/${proposal.id}`}>
66+
<Link to={`/cosmos/proposals/${chainName}/${proposal.id}`}>
6567
<button className="d-btn">Details</button>
6668
</Link>
6769
</td>

0 commit comments

Comments
 (0)