Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions govtool/frontend/package-lock.json

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

2 changes: 1 addition & 1 deletion govtool/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"@emotion/styled": "^11.11.0",
"@emurgo/cardano-serialization-lib-asmjs": "^12.1.1",
"@hookform/resolvers": "^3.3.1",
"@intersect.mbo/govtool-outcomes-pillar-ui": "1.2.5",
"@intersect.mbo/govtool-outcomes-pillar-ui": "1.3.0",
"@intersect.mbo/intersectmbo.org-icons-set": "^1.0.8",
"@intersect.mbo/pdf-ui": "0.6.4",
"@mui/icons-material": "^5.14.3",
Expand Down
67 changes: 36 additions & 31 deletions govtool/frontend/src/pages/GovernanceActionOutComes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,57 @@ import React, { Suspense } from "react";
import { Footer, TopNav } from "@/components/organisms";
import { useCardano } from "@/context";
import { useScreenDimension } from "@/hooks";
import { Background } from "@/components/atoms";

const GovernanceActionsOutcomes = React.lazy(
() => import("@intersect.mbo/govtool-outcomes-pillar-ui/dist/esm"),
);

export const GovernanceActionOutComesPillar = () => {
const { pagePadding } = useScreenDimension();
const { ...context } = useCardano();
const { walletApi, ...context } = useCardano();
return (
<Box
sx={{
display: "flex",
flexDirection: "column",
flex: 1,
minHeight: !context.isEnabled ? "100vh" : "auto",
}}
>
{!context.isEnabled && <TopNav />}
<Background>
<Box
sx={{
px: context.isEnabled ? { xs: 2, sm: 5 } : pagePadding,
py: 3,
display: "flex",
flexDirection: "column",
flex: 1,
minHeight: !context.isEnabled ? "100vh" : "auto",
}}
>
<Suspense
fallback={
<Box
sx={{
display: "flex",
flex: 1,
alignItems: "center",
justifyContent: "center",
}}
>
<CircularProgress />
</Box>
}
{!context.isEnabled && <TopNav />}
<Box
sx={{
px: context.isEnabled ? { xs: 2, sm: 5 } : pagePadding,
py: 3,
display: "flex",
flex: 1,
}}
>
<GovernanceActionsOutcomes
apiUrl={import.meta.env.VITE_OUTCOMES_API_URL}
/>
</Suspense>
<Suspense
fallback={
<Box
sx={{
display: "flex",
flex: 1,
alignItems: "center",
justifyContent: "center",
}}
>
<CircularProgress />
</Box>
}
>
<GovernanceActionsOutcomes
apiUrl={import.meta.env.VITE_OUTCOMES_API_URL}
ipfsGateway={import.meta.env.VITE_IPFS_GATEWAY}
walletAPI={{ ...context, ...walletApi }}
/>
</Suspense>
</Box>
{!context.isEnabled && <Footer />}
</Box>
{!context.isEnabled && <Footer />}
</Box>
</Background>
);
};
2 changes: 2 additions & 0 deletions govtool/frontend/src/types/@intersect.mbo.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ type ProposalDiscussionProps = {

type GovernanceActionsOutcomesProps = {
apiUrl?: string;
ipfsGateway?: string;
walletAPI?: any;
};

declare module "@intersect.mbo/pdf-ui/cjs" {
Expand Down
22 changes: 13 additions & 9 deletions govtool/frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1487,16 +1487,20 @@
resolved "https://registry.npmjs.org/@inquirer/type/-/type-3.0.4.tgz"
integrity sha512-2MNFrDY8jkFYc9Il9DgLsHhMzuHnOYM1+CUYVWbzu9oT0hC7V7EcYvdCKeoll/Fcci04A+ERZ9wcc7cQ8lTkIA==

"@intersect.mbo/govtool-outcomes-pillar-ui@1.2.5":
version "1.2.5"
resolved "https://registry.npmjs.org/@intersect.mbo/govtool-outcomes-pillar-ui/-/govtool-outcomes-pillar-ui-1.2.5.tgz"
integrity sha512-z0QDUZKj262vvNCtjr2L8ILgeub8da3ryhMhgLJpuxuO1zfEBUhTuwUPkRuLBE1Gf52TW/AfgmR2qXANsjY4/Q==
"@intersect.mbo/govtool-outcomes-pillar-ui@1.3.0":
version "1.3.0"
resolved "https://registry.npmjs.org/@intersect.mbo/govtool-outcomes-pillar-ui/-/govtool-outcomes-pillar-ui-1.3.0.tgz"
integrity sha512-6+H+QG8kyM2UUEycNsjrF1K5+UGUw6+wy7gRxlyOtFjIrZ9CUdTfwwyD1hrh+g55awZ4t+EmQgYB00An0iXOag==
dependencies:
"@fontsource/poppins" "^5.0.14"
"@intersect.mbo/intersectmbo.org-icons-set" "^1.0.8"
axios "^1.7.9"
axios "^1.8.4"
bech32 "^2.0.0"
buffer "^6.0.3"
react-diff-view "^3.2.1"
rehype-katex "^7.0.1"
remark-math "^6.0.0"
unidiff "^1.0.4"

"@intersect.mbo/intersectmbo.org-icons-set@^1.0.8", "@intersect.mbo/intersectmbo.org-icons-set@^1.1.0":
version "1.1.0"
Expand Down Expand Up @@ -4486,10 +4490,10 @@ axe-core@^4.10.0:
resolved "https://registry.npmjs.org/axe-core/-/axe-core-4.10.2.tgz"
integrity sha512-RE3mdQ7P3FRSe7eqCWoeQ/Z9QXrtniSjp1wUjt5nRC3WIpz5rSCve6o3fsZ2aCpJtrZjSZgjwXAoTO5k4tEI0w==

axios@^1.4.0, axios@^1.6.1, axios@^1.7.2, axios@^1.7.9:
version "1.7.9"
resolved "https://registry.npmjs.org/axios/-/axios-1.7.9.tgz"
integrity sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==
axios@^1.4.0, axios@^1.6.1, axios@^1.7.2, axios@^1.8.4:
version "1.8.4"
resolved "https://registry.npmjs.org/axios/-/axios-1.8.4.tgz"
integrity sha512-eBSYY4Y68NNlHbHBMdeDmKNtDgXWhQsJcGqzO3iLUM0GraQFSS9cVgPX5I9b3lbdFKyYoAEGAZF1DwhTaljNAw==
dependencies:
follow-redirects "^1.15.6"
form-data "^4.0.0"
Expand Down