Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/cfe 206 proposal top #745

Merged
merged 12 commits into from
Feb 1, 2024
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Features

- [#745](https://github.com/alleslabs/celatone-frontend/pull/745) Add proposal top
- [#757](https://github.com/alleslabs/celatone-frontend/pull/757) api v1 - proposal data
- [#731](https://github.com/alleslabs/celatone-frontend/pull/731) Add proposal detail page structure
- [#749](https://github.com/alleslabs/celatone-frontend/pull/749) Add multi-type proposals
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
"next-sitemap": "^3.1.25",
"prettier": "^3.0.3",
"storybook": "^7.6.9",
"storybook-react-context": "^0.6.0",
jennieramida marked this conversation as resolved.
Show resolved Hide resolved
"ts-jest": "^29.0.5",
"typescript": "^5.1.6"
},
Expand Down
190 changes: 190 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions src/lib/components/ExplorerLink.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ export type LinkType =
| "code_id"
| "block_height"
| "proposal_id"
| "pool_id";
| "pool_id"
| "proposal_id";

interface ExplorerLinkProps extends BoxProps {
value: string;
Expand Down Expand Up @@ -75,13 +76,12 @@ export const getNavigationUrl = ({
url = "/blocks";
break;
case "proposal_id":
url =
explorerConfig.proposal ||
`${lcdEndpoint}/cosmos/gov/v1beta1/proposals`;
url = "/proposals";
break;
case "pool_id":
url = "/pools";
break;

jennieramida marked this conversation as resolved.
Show resolved Hide resolved
case "invalid_address":
return "";
default:
Expand Down Expand Up @@ -189,7 +189,8 @@ export const ExplorerLink = ({
type === "user_address" ||
type === "tx_hash" ||
type === "block_height" ||
type === "pool_id";
type === "pool_id" ||
type === "proposal_id";

const [hrefLink, textValue] = [
getNavigationUrl({
Expand Down
Loading
Loading