Skip to content

Commit 60223a2

Browse files
committed
feat(#3467, #3494): change Hero card CTA behaviour and docs
1 parent 074b10d commit 60223a2

File tree

4 files changed

+17
-13
lines changed

4 files changed

+17
-13
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ changes.
1616

1717
### Changed
1818

19+
- Update first CTA on GovTool home page [Issue 3467](https://github.com/IntersectMBO/govtool/issues/3467)
20+
- Change link to docs in learn more about governance [Issue 3494](https://github.com/IntersectMBO/govtool/issues/3494)
21+
1922
### Removed
2023

2124
- Remove additional canonicalization of the metadata [Issue 3591](https://github.com/IntersectMBO/govtool/issues/3591)

govtool/frontend/src/components/organisms/Hero.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
import { useMemo } from "react";
2-
import { useNavigate } from "react-router-dom";
32
import { Trans } from "react-i18next";
43
import { Box, Link } from "@mui/material";
4+
import { ArrowDownward } from "@mui/icons-material";
55

66
import { Button, Typography } from "@atoms";
7-
import { IMAGES, PATHS } from "@consts";
8-
import { useCardano, useModal } from "@context";
7+
import { IMAGES } from "@consts";
98
import { useScreenDimension, useTranslation } from "@hooks";
109
import { openInNewTab } from "@utils";
1110

1211
export const Hero = () => {
13-
const { isEnabled } = useCardano();
14-
const { openModal } = useModal();
15-
const navigate = useNavigate();
1612
const { isMobile, screenWidth } = useScreenDimension();
1713
const { t } = useTranslation();
1814
const IMAGE_SIZE = screenWidth < 640 ? 300 : screenWidth < 860 ? 400 : 600;
@@ -33,7 +29,8 @@ export const Hero = () => {
3329
return screenWidth / 11;
3430
}, [screenWidth]);
3531

36-
const onClickVotingPower = () => openInNewTab("https://docs.gov.tools");
32+
const onClickVotingPower = () =>
33+
openInNewTab("https://docs.cardano.org/about-cardano/governance-overview");
3734

3835
return (
3936
<Box
@@ -79,12 +76,15 @@ export const Hero = () => {
7976
<Button
8077
data-testid="hero-connect-wallet-button"
8178
onClick={() => {
82-
if (isEnabled) {
83-
navigate(PATHS.dashboard);
84-
} else {
85-
openModal({ type: "chooseWallet" });
86-
}
79+
const homeCards =
80+
window.document.getElementsByClassName("home-cards")[0];
81+
82+
homeCards.scrollIntoView({
83+
behavior: "smooth",
84+
block: "nearest",
85+
});
8786
}}
87+
endIcon={<ArrowDownward />}
8888
size={isMobile ? "medium" : "extraLarge"}
8989
>
9090
{t("hero.connectWallet")}

govtool/frontend/src/components/organisms/HomeCards.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ export const HomeCards = () => {
6060
gridTemplateColumns="repeat(auto-fill, minmax(300px, 866px))"
6161
justifyContent="center"
6262
rowGap={4.625}
63+
className="home-cards"
6364
>
6465
{/* DELEGATE CARD */}
6566
<ActionCard

govtool/frontend/src/i18n/locales/en.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@
539539
}
540540
},
541541
"hero": {
542-
"connectWallet": "Connect your wallet to start",
542+
"connectWallet": "Participate now",
543543
"description": "Cardano Governance lets Ada holders have a say in the network's future.\n\nYou can vote directly, find someone to represent you, or become a representative for others.\n\nYou can also propose changes in the network yourself, put these up for discussion and eventually, a vote.\n\n<0>Learn more about governance</0> in the guide, or have a look around the app and see Cardano Governance in action.",
544544
"headline": "Cardano \n Governance Tool"
545545
},

0 commit comments

Comments
 (0)