Skip to content

Commit

Permalink
Merge pull request #2534 from IntersectMBO/staging
Browse files Browse the repository at this point in the history
hotfix: matomo init
  • Loading branch information
MSzalowski authored Dec 17, 2024
2 parents d7a17ec + 56aa382 commit 1109407
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion govtool/frontend/Dockerfile.qovery
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ARG VITE_NETWORK_FLAG=0
ARG VITE_SENTRY_DSN
ARG NPMRC_TOKEN
ARG VITE_USERSNAP_SPACE_API_KEY
ARG VITE_IS_PROPOSAL_DISCUSSION_FORUM_ENABLED='true'
ARG VITE_IS_PROPOSAL_DISCUSSION_FORUM_ENABLED
ARG VITE_PDF_API_URL
ARG VITE_IPFS_GATEWAY
ARG VITE_IPFS_PROJECT_ID
Expand Down
1 change: 0 additions & 1 deletion govtool/frontend/src/context/wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ const CardanoProvider = (props: Props) => {
.to_hex();
});
} else {
console.warn(t("warnings.usingUnregisteredStakeKeys"));
stakeKeysList = unregisteredStakeKeysList.map((key) => {
const stakeKeyHash = PublicKey.from_hex(key).hash();
const stakeCredential = Credential.from_keyhash(stakeKeyHash);
Expand Down
10 changes: 5 additions & 5 deletions govtool/frontend/src/hooks/useMatomo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import { useEffect } from "react";

export const useMatomo = () => {
useEffect(() => {
const env = import.meta.env.VITE_APP_ENV;
if (env !== "prodction" || env !== "staging") {
return;
}
const isSancho = window.location.href.includes("sancho");
if (isSancho) return;

const network = import.meta.env.VITE_NETWORK_FLAG;
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-expect-error
const _paq = (window._paq = window._pag || []);
Expand All @@ -19,7 +19,7 @@ export const useMatomo = () => {
(function () {
const u = "//analytics.gov.tools/";
_paq.push(["setTrackerUrl", u + "matomo.php"]);
_paq.push(["setSiteId", env === "production" ? "1" : "2"]);
_paq.push(["setSiteId", network === 1 ? "1" : "2"]);
const d = document;
const g = d.createElement("script");
const s = d.getElementsByTagName("script")[0];
Expand Down
2 changes: 1 addition & 1 deletion govtool/frontend/src/pages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export * from "./GovernanceActionDetails";
export * from "./GovernanceActions";
export * from "./GovernanceActionsCategory";
export * from "./Home";
export * from "./ProposalDiscussion";
export * from "./RegisterAsDirectVoter";
export * from "./RegisterAsDirectVoter";
export * from "./RegisterAsdRep";
export * from "./RetireAsDirectVoter";
export * from "./RetireAsDrep";
export * from "./ProposalDiscussion";

0 comments on commit 1109407

Please sign in to comment.