Skip to content

Commit

Permalink
Fixing basic margins and display logic
Browse files Browse the repository at this point in the history
  • Loading branch information
brickpop committed Jun 6, 2024
1 parent a90eca2 commit b52ade9
Show file tree
Hide file tree
Showing 13 changed files with 104 additions and 598 deletions.
14 changes: 7 additions & 7 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# PUBLIC ENV VARS

# General
NEXT_PUBLIC_DAO_ADDRESS=0x32844d83744AA532009B561a753a144E6f98C283
NEXT_PUBLIC_TOKEN_ADDRESS=0xD7090050422785a989a6a2Bf519C26E09Bc8BABc
NEXT_PUBLIC_DAO_ADDRESS=0xeB4586617089270Fe042F69Bf799590AF224807a
NEXT_PUBLIC_TOKEN_ADDRESS=0x12b2574840dB17C2278d9725a2679E97FE266075

# Plugin addresses
NEXT_PUBLIC_MULTISIG_PLUGIN_ADDRESS=0x9695520e32F85eF403f6B18b8a94e44A90D5cBF0
NEXT_PUBLIC_EMERGENCY_MULTISIG_PLUGIN_ADDRESS=0x832d6339e26EF129cEd320f84d19034a3d3411e6
NEXT_PUBLIC_DUAL_GOVERNANCE_PLUGIN_ADDRESS=0xeB6e121d41B1C72Bb89cAd700de693e40af3A83e
NEXT_PUBLIC_PUBLIC_KEY_REGISTRY_CONTRACT_ADDRESS=0xBFE2bf3F192e87747d61824041a2A6e1b5a3a130
NEXT_PUBLIC_DELEGATION_WALL_CONTRACT_ADDRESS=0xFdA7007A88CF56Ac0662E9500a06C736e51023eC
NEXT_PUBLIC_MULTISIG_PLUGIN_ADDRESS=0xd8Fe1194Cf90eF38b54A110EcfeAE8F2AA5Dfe86
NEXT_PUBLIC_EMERGENCY_MULTISIG_PLUGIN_ADDRESS=0xeCBa720A8645B198b2637f6559B9155E4bc3B566
NEXT_PUBLIC_DUAL_GOVERNANCE_PLUGIN_ADDRESS=0xd9F6A2533efab98bA016Cb1D3001b6Ec1C246485
NEXT_PUBLIC_PUBLIC_KEY_REGISTRY_CONTRACT_ADDRESS=0xbD8E6796c937217fD728567C650Ab64F8CB702fC
NEXT_PUBLIC_DELEGATION_WALL_CONTRACT_ADDRESS=0x964140B4Aad144bfe9cCDc6EB06baeBc4bed3357

# Network and services
NEXT_PUBLIC_CHAIN_NAME=sepolia
Expand Down
2 changes: 1 addition & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function Home() {
const { open } = useWeb3Modal();

return (
<main className="w-screen max-w-full flex-col">
<main className="w-screen max-w-full flex-col p-12">
<Card>
<h1 className="text-2xl font-[700] text-neutral-800">Welcome to Aragonette!</h1>
<p className="text-md text-neutral-400">
Expand Down
2 changes: 1 addition & 1 deletion pages/plugins/[id].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const PluginLoader: FC = () => {
if (!PageComponent) {
if (componentLoading) {
return (
<div>
<div className="p-12">
<PleaseWaitSpinner />
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion plugins/delegateAnnouncer/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default function DelegateAnnouncements() {
}

function MainSection({ children }: { children: ReactNode }) {
return <main className="flex w-screen max-w-full flex-col">{children}</main>;
return <main className="flex w-screen max-w-full flex-col p-12">{children}</main>;
}

function SectionView({ children }: { children: ReactNode }) {
Expand Down
65 changes: 41 additions & 24 deletions plugins/dualGovernance/pages/proposal-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,17 @@ import { useAccount, useBlockNumber, useReadContract } from "wagmi";
import { type ReactNode, useEffect } from "react";
import ProposalCard from "@/plugins/dualGovernance/components/proposal";
import { OptimisticTokenVotingPluginAbi } from "@/plugins/dualGovernance/artifacts/OptimisticTokenVotingPlugin.sol";
import { Button, DataList, IconType, ProposalDataListItemSkeleton, type DataListState } from "@aragon/ods";
import {
Button,
DataList,
IconType,
IllustrationHuman,
ProposalDataListItemSkeleton,
type DataListState,
} from "@aragon/ods";
import { useCanCreateProposal } from "@/plugins/dualGovernance/hooks/useCanCreateProposal";
import Link from "next/link";
import { If } from "@/components/if";
import { Else, If, Then } from "@/components/if";
import { PUB_DUAL_GOVERNANCE_PLUGIN_ADDRESS, PUB_CHAIN } from "@/constants";
import { TaikoOptimisticTokenVotingPluginAbi } from "../artifacts/TaikoOptimisticTokenVotingPlugin.sol";
// import { digestPagination } from "@/utils/pagination";
Expand Down Expand Up @@ -81,29 +88,39 @@ export default function Proposals() {
<h1 className="justify-self-start align-middle text-3xl font-semibold">Proposals</h1>
</SectionView>
<If condition={proposalCount}>
<DataList.Root
entityLabel={entityLabel}
itemsCount={proposalCount}
pageSize={DEFAULT_PAGE_SIZE}
state={dataListState}
//onLoadMore={fetchNextPage}
>
<DataList.Container
SkeletonElement={ProposalDataListItemSkeleton}
errorState={errorState}
emptyState={emptyState}
emptyFilteredState={emptyFilteredState}
<Then>
<DataList.Root
entityLabel={entityLabel}
itemsCount={proposalCount}
pageSize={DEFAULT_PAGE_SIZE}
state={dataListState}
//onLoadMore={fetchNextPage}
>
{proposalCount &&
Array.from(Array(proposalCount)?.keys())
.reverse()
?.map((proposalIndex) => (
// TODO: update with router agnostic ODS DataListItem
<ProposalCard key={proposalIndex} proposalId={BigInt(proposalIndex)} />
))}
</DataList.Container>
<DataList.Pagination />
</DataList.Root>
<DataList.Container
SkeletonElement={ProposalDataListItemSkeleton}
errorState={errorState}
emptyState={emptyState}
emptyFilteredState={emptyFilteredState}
>
{proposalCount &&
Array.from(Array(proposalCount)?.keys())
.reverse()
?.map((proposalIndex) => (
// TODO: update with router agnostic ODS DataListItem
<ProposalCard key={proposalIndex} proposalId={BigInt(proposalIndex)} />
))}
</DataList.Container>
<DataList.Pagination />
</DataList.Root>
</Then>
<Else>
<div className="w-full">
<p className="text-md text-neutral-400">
No proposals have been created yet. Here you will see the proposals approved by the Security Council.
</p>
<IllustrationHuman className="mx-auto mb-10 max-w-72" body="BLOCKS" expression="SMILE_WINK" hairs="CURLY" />
</div>
</Else>
</If>
</MainSection>
);
Expand Down
86 changes: 53 additions & 33 deletions plugins/multisig/pages/proposal-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@ import { useAccount, useBlockNumber, useReadContract } from "wagmi";
import { type ReactNode, useEffect, useState } from "react";
import ProposalCard from "@/plugins/multisig/components/proposal";
import { MultisigPluginAbi } from "@/plugins/multisig/artifacts/MultisigPlugin";
import { Button, DataList, IconType, ProposalDataListItemSkeleton, type DataListState } from "@aragon/ods";
import {
Button,
DataList,
IconType,
IllustrationHuman,
ProposalDataListItemSkeleton,
type DataListState,
} from "@aragon/ods";
import { useCanCreateProposal } from "@/plugins/multisig/hooks/useCanCreateProposal";
import Link from "next/link";
import { Else, ElseIf, If, Then } from "@/components/if";
Expand Down Expand Up @@ -53,16 +60,6 @@ export default function Proposals() {
},
};

const emptyState = {
heading: "No proposals found",
description: "Start by creating a proposal",
primaryButton: {
label: "Create onChain PIP",
iconLeft: IconType.PLUS,
onClick: () => alert("create proposal"),
},
};

const errorState = {
heading: "Error loading proposals",
description: "There was an error loading the proposals. Try again!",
Expand All @@ -88,29 +85,52 @@ export default function Proposals() {
</div>
</SectionView>
<If condition={proposalCount}>
<DataList.Root
entityLabel={entityLabel}
itemsCount={proposalCount}
pageSize={DEFAULT_PAGE_SIZE}
state={dataListState}
//onLoadMore={fetchNextPage}
>
<DataList.Container
SkeletonElement={ProposalDataListItemSkeleton}
errorState={errorState}
emptyState={emptyState}
emptyFilteredState={emptyFilteredState}
<Then>
<DataList.Root
entityLabel={entityLabel}
itemsCount={proposalCount}
pageSize={DEFAULT_PAGE_SIZE}
state={dataListState}
//onLoadMore={fetchNextPage}
>
{proposalCount &&
Array.from(Array(proposalCount)?.keys())
.reverse()
?.map((proposalIndex, index) => (
// TODO: update with router agnostic ODS DataListItem
<ProposalCard key={proposalIndex} proposalId={BigInt(proposalIndex)} />
))}
</DataList.Container>
<DataList.Pagination />
</DataList.Root>
<DataList.Container
SkeletonElement={ProposalDataListItemSkeleton}
errorState={errorState}
emptyFilteredState={emptyFilteredState}
>
{proposalCount &&
Array.from(Array(proposalCount)?.keys())
.reverse()
?.map((proposalIndex, index) => (
// TODO: update with router agnostic ODS DataListItem
<ProposalCard key={proposalIndex} proposalId={BigInt(proposalIndex)} />
))}
</DataList.Container>
<DataList.Pagination />
</DataList.Root>
</Then>
<Else>
<div className="w-full">
<p className="text-md text-neutral-400">
No proposals have been created yet. Here you will see the proposals created by the Security Council before
they can be submitted to the{" "}
<Link href="/plugins/community-proposals/#/" className="underline">
community voting stage
</Link>
.
</p>
<IllustrationHuman className="mx-auto mb-10 max-w-72" body="BLOCKS" expression="SMILE_WINK" hairs="CURLY" />
<If condition={canCreate}>
<div className="flex justify-center">
<Link href="#/new">
<Button iconLeft={IconType.PLUS} size="md" variant="primary">
Submit Proposal
</Button>
</Link>
</div>
</If>
</div>
</Else>
</If>
</MainSection>
);
Expand Down
13 changes: 0 additions & 13 deletions scripts/deploy/0-checks.ts

This file was deleted.

90 changes: 0 additions & 90 deletions scripts/deploy/1-governance-erc20-token.ts

This file was deleted.

20 changes: 0 additions & 20 deletions scripts/deploy/2-token-voting.ts

This file was deleted.

24 changes: 0 additions & 24 deletions scripts/deploy/3-delegate-announcer.ts

This file was deleted.

Loading

0 comments on commit b52ade9

Please sign in to comment.