+
@@ -50,20 +57,49 @@ function ProposalContent({ data }: { data: MergedProposalData }) {
const { proposal, metadata } = data;
const title = trimToLength(metadata?.title || `Proposal #${proposal?.id}`, 80);
- //TODO loading/err
- const { content } = useProposalContent(metadata);
+ const { content, isLoading } = useProposalContent(metadata);
return (
Browse proposals
{title}
-
+ {isLoading && !content &&
Loading proposal content}
+ {!isLoading && !content && (
+
+
No CGP content found for this proposal
+
+ Check the{' '}
+
+ Celo Governance repository
+ {' '}
+ for more information
+
+
+ )}
+ {content && (
+
+ )}
);
}
function ProposalChainData({ data: { proposal } }: { data: MergedProposalData }) {
if (!proposal) return null;
- return
TODO
;
+ return (
+
+
+
Vote
+
+
+
Results
+
+
+
Voters
+
+
+ );
}
diff --git a/src/app/governance/[id]/styles.module.css b/src/app/governance/[id]/styles.module.css
new file mode 100644
index 0000000..aea8371
--- /dev/null
+++ b/src/app/governance/[id]/styles.module.css
@@ -0,0 +1,59 @@
+.proposal h1,
+.proposal h2,
+.proposal h3,
+.proposal h4 {
+ font-family: 'Garamond', serif;
+}
+
+.proposal h1,
+.proposal h2 {
+ font-size: 24px;
+}
+
+.proposal h3 {
+ font-size: 20px;
+}
+
+.proposal h4 {
+ font-size: 18px;
+}
+
+.proposal a {
+ text-decoration: underline;
+ cursor: pointer;
+}
+
+.proposal a:hover {
+ opacity: 0.75;
+}
+
+.proposal a:active {
+ opacity: 0.65;
+}
+
+.proposal ol,
+.proposal ul {
+ padding-left: 1rem;
+}
+
+.proposal ul {
+ list-style: disc;
+}
+
+.proposal ol {
+ list-style: decimal;
+}
+
+.proposal li {
+ padding-left: 1rem;
+ margin-top: 0.6rem;
+}
+
+.proposal pre {
+ padding: 0.5rem;
+ background-color: rgba(0, 0, 0, 0.04);
+}
+
+.proposal img {
+ display: none;
+}
diff --git a/src/app/governance/page.tsx b/src/app/governance/page.tsx
index 6fd4930..d6799fa 100644
--- a/src/app/governance/page.tsx
+++ b/src/app/governance/page.tsx
@@ -3,7 +3,7 @@
import Image from 'next/image';
import { useMemo, useState } from 'react';
import { Fade } from 'src/components/animation/Fade';
-import { SpinnerWithLabel } from 'src/components/animation/Spinner';
+import { FullWidthSpinner } from 'src/components/animation/Spinner';
import { TabHeaderFilters } from 'src/components/buttons/TabHeaderButton';
import { SearchField } from 'src/components/input/SearchField';
import { Section } from 'src/components/layout/Section';
@@ -109,9 +109,7 @@ function ProposalList() {
) : (
-