Skip to content

Commit

Permalink
fix: round type badge
Browse files Browse the repository at this point in the history
  • Loading branch information
boudra committed Feb 15, 2024
1 parent f779489 commit 4689c41
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
10 changes: 10 additions & 0 deletions packages/common/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,16 @@ export type RoundPayoutType =
| "DIRECT"
| "allov1.Direct"
| "allov1.QF";

export const ROUND_PAYOUT_STRATEGY_TITLES: Record<string, string> = {
MERKLE: "Quadratic Funding",
DIRECT: "Direct Grants",
"allov1.QF": "Quadratic Funding",
"allov1.Direct": "Direct Grants",
"allov2.DonationVotingMerkleDistributionDirectTransferStrategy":
"Quadratic Funding",
};

export type RoundVisibilityType = "public" | "private";

export type { Allo, AlloError, AlloOperation } from "./allo/allo";
Expand Down
14 changes: 2 additions & 12 deletions packages/round-manager/src/features/common/Utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ROUND_PAYOUT_DIRECT, ROUND_PAYOUT_MERKLE } from "common";
import { ROUND_PAYOUT_STRATEGY_TITLES } from "common";

export const verticalTabStyles = (selected: boolean) =>
selected
Expand All @@ -11,15 +11,5 @@ export const horizontalTabStyles = (selected: boolean) =>
: "border-transparent text-grey-400 hover:text-gray-700 hover:border-gray-300 whitespace-nowrap py-4 px-1 font-medium text-sm";

export const getPayoutRoundDescription = (key: string) => {
switch (key) {
case ROUND_PAYOUT_MERKLE:
return "Quadratic Funding";
break;
case ROUND_PAYOUT_DIRECT:
return "Direct Grant";
break;
default:
return key;
break;
}
return ROUND_PAYOUT_STRATEGY_TITLES[key] ?? key;
};

0 comments on commit 4689c41

Please sign in to comment.