Open twodam opened 1 year ago
we should update Proposal
type. Currently has a lot of legacy things from notion
Currently:
export interface Proposal {
hash: string;
title: string;
body?: string;
governanceCycle?: number;
date?: string,
status: string;
proposalId: number | null;
author?: string;
coauthors?: string[];
discussionThreadURL: string;
ipfsURL: string;
voteURL: string;
voteSetup?: SnapshotVoteOptions;
internalVoteResults?: InternalVoteResults;
voteResults?: VoteResults;
version?: string;
authorAddress?: string;
authorDiscordId?: string;
temperatureCheckVotes?: number[];
createdTime?: Date;
lastEditedTime?: Date;
actions?: Action[];
}
I am using a different type internally called SQLProposal
can we just unify on SQLProposal
and rename to Proposal
export type SQLProposal = {
uuid: string;
createdTime: Date;
lastEditedTime: Date;
title: string;
body: string;
authorAddress: string;
coauthors: string[];
authorDiscordId?: string;
proposalStatus: string;
proposalId?: number;
temperatureCheckVotes: number[];
snapshotId?: string;
voteType: string;
choices: string[];
snapshotVotes: number[];
voteAddressCount: number;
governanceCycle: number;
discussionURL?: string;
ipfsCID?: string;
actions: Action[];
};
https://www.npmjs.com/package/@nance/nance-sdk live preview of demo: https://nance-sdk.vercel.app/
should add functions to support vanilla js fetch in case client is not using React