From 7cedaec3af4344e78be53e1322af5edd1b2876c9 Mon Sep 17 00:00:00 2001 From: Aditya Anand M C Date: Mon, 17 Jun 2024 15:00:15 +0530 Subject: [PATCH] fix --- packages/common/src/icons/AlloV1Black.tsx | 8 + .../src/features/common/LandingPage.tsx | 10 +- .../src/features/program/ProgramCard.tsx | 2 +- .../src/features/program/ProgramListPage.tsx | 181 +++++++++--------- .../src/features/round/RoundCard.tsx | 4 +- .../src/features/round/RoundListPage.tsx | 150 ++++++++------- 6 files changed, 184 insertions(+), 171 deletions(-) create mode 100644 packages/common/src/icons/AlloV1Black.tsx diff --git a/packages/common/src/icons/AlloV1Black.tsx b/packages/common/src/icons/AlloV1Black.tsx new file mode 100644 index 000000000..501697bcf --- /dev/null +++ b/packages/common/src/icons/AlloV1Black.tsx @@ -0,0 +1,8 @@ +export default function AlloV1Black() { + return ( + + + + + ); +} diff --git a/packages/round-manager/src/features/common/LandingPage.tsx b/packages/round-manager/src/features/common/LandingPage.tsx index e0c304d46..127b891e5 100644 --- a/packages/round-manager/src/features/common/LandingPage.tsx +++ b/packages/round-manager/src/features/common/LandingPage.tsx @@ -15,14 +15,12 @@ function LandingPage() { fetchProgramsStatus === ProgressStatus.IS_SUCCESS && !listProgramsError; return ( - <> -
- +
+ -
-
- +
+
); } diff --git a/packages/round-manager/src/features/program/ProgramCard.tsx b/packages/round-manager/src/features/program/ProgramCard.tsx index 9bdeb4762..9d6d40b32 100644 --- a/packages/round-manager/src/features/program/ProgramCard.tsx +++ b/packages/round-manager/src/features/program/ProgramCard.tsx @@ -10,7 +10,7 @@ import { import { CardProps } from "../common/types"; export const ProgramCard: React.FC = (props: CardProps) => ( - + {props.title} diff --git a/packages/round-manager/src/features/program/ProgramListPage.tsx b/packages/round-manager/src/features/program/ProgramListPage.tsx index 705da6571..0a49dc06c 100644 --- a/packages/round-manager/src/features/program/ProgramListPage.tsx +++ b/packages/round-manager/src/features/program/ProgramListPage.tsx @@ -9,6 +9,7 @@ import { useAlloVersion } from "common/src/components/AlloVersionSwitcher"; import { ExclamationCircleIcon } from "@heroicons/react/solid"; import { ProgramCard } from "./ProgramCard"; import { chunk } from "lodash"; +import AlloV1Black from "common/src/icons/AlloV1Black"; const maxProgramsPerRow = 4; @@ -67,19 +68,17 @@ function ListPrograms() { className="rounded-full w-6 h-6 mr-2" /> -
- {program.tags?.includes("allo-v1") && ( - // todo: add the icon for Allo - // - v1 - )} -
+ {program.tags?.includes("allo-v1") && ( +
+ +
+ )}
View details{" "} - +
} @@ -89,94 +88,98 @@ function ListPrograms() { }); return ( -
- {fetchProgramsStatus === ProgressStatus.IN_PROGRESS && ( - - )} - {/* todo: remove when ready */} - {version === "allo-v1" && ( -
-
- - You are currently on Allo v1. To switch to the most current version - of Manager,  - -   -
-
- Click  - - here - -  to learn more about Allo v2. -
-
- )} - {/* {version === "allo-v2" && ()} */} -
-
-
-
- - Programs - - { - setViewAllPrograms(!viewAllPrograms); +
+
+ {fetchProgramsStatus === ProgressStatus.IN_PROGRESS && ( + + )} + {/* todo: remove when ready */} + {version === "allo-v1" && ( +
+
+ + You are currently on Allo v1. To switch to the most current version + of Manager,  + +  
-
- - - - - Create program - - - +
+ Click  + + here + +  to learn more about Allo v2.
-
-
- {isSuccess && hasNoPrograms() && startAProgramCard} - {chunk( - viewAllPrograms - ? ProgramList - : ProgramList.slice(0, maxProgramsPerRow * 2), - maxProgramsPerRow - ).map((programsChunk, rowIndex) => ( -
- {programsChunk.map((program, index) => ( -
- {program} + )} +
+ {/* {version === "allo-v2" && ()} */} + {isSuccess && +
+
+
+ + Programs + + { + setViewAllPrograms(!viewAllPrograms); + }} + > + {viewAllPrograms ? "View less" : "View all"} +
- ))} +
+ + + + + Create program + + + +
+
- ))} -
-
-
+ } +
+ {isSuccess && hasNoPrograms() && startAProgramCard} + {chunk( + viewAllPrograms + ? ProgramList + : ProgramList.slice(0, maxProgramsPerRow * 2), + maxProgramsPerRow + ).map((programsChunk, rowIndex) => ( +
+ {programsChunk.map((program, index) => ( +
+ {program} +
+ ))} +
+ ))} +
+
+
+ ); } diff --git a/packages/round-manager/src/features/round/RoundCard.tsx b/packages/round-manager/src/features/round/RoundCard.tsx index 6543d7334..723d4e02e 100644 --- a/packages/round-manager/src/features/round/RoundCard.tsx +++ b/packages/round-manager/src/features/round/RoundCard.tsx @@ -8,7 +8,7 @@ import { import { CardProps } from "../common/types"; export const RoundCard: React.FC = (props: CardProps) => ( - +
@@ -37,7 +37,7 @@ export const RoundCard: React.FC = (props: CardProps) => (
{/* todo: figure out the status display by dates */} {props.status && props.status.status} diff --git a/packages/round-manager/src/features/round/RoundListPage.tsx b/packages/round-manager/src/features/round/RoundListPage.tsx index ab47d709d..76ccf745d 100644 --- a/packages/round-manager/src/features/round/RoundListPage.tsx +++ b/packages/round-manager/src/features/round/RoundListPage.tsx @@ -85,84 +85,88 @@ function ListRounds() { }); return ( -
- {fetchRoundStatus === ProgressStatus.IN_PROGRESS && ( - - )} - {/* todo: remove when ready */} - {version === "allo-v1" && ( -
-
- - You are currently on Allo v1. To switch to the most current version - of Manager,  - -   -
-
- Click  - - here - -  to learn more about Allo v2. -
-
- )} -
-
-
-
- - Rounds - - { - setViewAllRounds(!viewAllRounds); +
+
+ {fetchRoundStatus === ProgressStatus.IN_PROGRESS && ( + + )} + {/* todo: remove when ready */} + {version === "allo-v1" && ( +
+
+ + You are currently on Allo v1. To switch to the most current version + of Manager,  + +   +
+
+ Click  + + here + +  to learn more about Allo v2.
- -
- - Sort by Recent - - - - Filter by All - - -
-
-
-
- {roundList.length === 0 && ( -
- If you’re an operator of a round and you’re not a program admin, - that round will appear here. + )} + {isSuccess && +
+
+
+
+ + Rounds + + { + setViewAllRounds(!viewAllRounds); + }} + > + {viewAllRounds ? "View less" : "View all"} + +
+ +
+ + Sort by Recent + + + + Filter by All + + +
+
+
+
+
+ {roundList.length === 0 && ( +
+ If you’re an operator of a round and you’re not a program admin, + that round will appear here. +
+ )} + {viewAllRounds ? roundList : roundList.slice(0, maxRoundsPerSite)}
- )} - {viewAllRounds ? roundList : roundList.slice(0, maxRoundsPerSite)} -
-
-
+
+ } +
+ ); }