Skip to content

Commit 49b6256

Browse files
authored
Merge pull request #3646 from IntersectMBO/feat/1613-provide-pdf-version-in-bug-reports
chore: add outcomes and pdf-ui version tags to sentry
2 parents 8aacc01 + 6396e29 commit 49b6256

File tree

4 files changed

+7
-13
lines changed

4 files changed

+7
-13
lines changed

govtool/frontend/src/components/organisms/RegisterAsDRepSteps/WhatRetirementMeans.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useCallback, useEffect, useState } from "react";
1+
import { useCallback, useState } from "react";
22
import * as Sentry from "@sentry/react";
33

44
import { Typography } from "@atoms";
@@ -35,10 +35,6 @@ export const WhatRetirementMeans = ({
3535
closeModal();
3636
};
3737

38-
useEffect(() => {
39-
Sentry.setTag("component_name", "WhatRetirementMeans");
40-
}, []);
41-
4238
const retireAsDrep = useCallback(async () => {
4339
try {
4440
setIsRetirementLoading(true);

govtool/frontend/src/context/appContext.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ const AppContext = createContext<AppContextType | null>(null);
3939
* @param children - The child components to render.
4040
*/
4141
const AppContextProvider = ({ children }: PropsWithChildren) => {
42-
useEffect(() => {
43-
Sentry.setTag("component_name", "AppContextProvider");
44-
}, []);
4542
const { fetchEpochParams, epochParams } = useGetEpochParams();
4643
const { fetchNetworkInfo, networkInfo } = useGetNetworkInfo();
4744

govtool/frontend/src/context/governanceAction.tsx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
createContext,
55
useContext,
66
useCallback,
7-
useEffect,
87
} from "react";
98
import { NodeObject } from "jsonld";
109
import { blake2bHex } from "blakejs";
@@ -43,10 +42,6 @@ const GovernanceActionProvider = ({ children }: PropsWithChildren) => {
4342
* @returns The JSON-LD representation of the governance action.
4443
*/
4544

46-
useEffect(() => {
47-
Sentry.setTag("component_name", "GovernanceActionProvider");
48-
}, []);
49-
5045
const createGovernanceActionJsonLD = useCallback(
5146
async (govActionMetadata: GovActionMetadata) => {
5247
try {

govtool/frontend/src/main.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ Sentry.init({
5454
},
5555
});
5656

57+
Sentry.setTag("pdf_ui_version", pkg.dependencies["@intersect.mbo/pdf-ui"]);
58+
Sentry.setTag(
59+
"govtool_outcomes_pillar_ui_version",
60+
pkg.dependencies["@intersect.mbo/govtool-outcomes-pillar-ui"],
61+
);
62+
5763
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
5864
<React.StrictMode>
5965
<QueryClientProvider client={queryClient}>

0 commit comments

Comments
 (0)