From 248d0947628c572fdbe271f104c72269d49733db Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Wed, 29 Mar 2023 16:27:55 +0530 Subject: [PATCH] feat: cycle list page (#577) * style: cycle list page * fix:typo fix --- apps/app/components/cycles/cycles-list.tsx | 15 +++++++++++++-- .../projects/[projectId]/cycles/index.tsx | 6 ++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/apps/app/components/cycles/cycles-list.tsx b/apps/app/components/cycles/cycles-list.tsx index 54bf415c5..28cd171d0 100644 --- a/apps/app/components/cycles/cycles-list.tsx +++ b/apps/app/components/cycles/cycles-list.tsx @@ -1,11 +1,12 @@ import { useState } from "react"; // components -import { DeleteCycleModal, SingleCycleCard } from "components/cycles"; +import { DeleteCycleModal, SingleCycleCard } from "components/cycles"; import { EmptyState, Loader } from "components/ui"; // image import emptyCycle from "public/empty-state/empty-cycle.svg"; - +// icon +import { XMarkIcon } from "@heroicons/react/24/outline"; // types import { ICycle, SelectCycleType } from "types"; @@ -24,6 +25,7 @@ export const CyclesList: React.FC = ({ }) => { const [cycleDeleteModal, setCycleDeleteModal] = useState(false); const [selectedCycleForDelete, setSelectedCycleForDelete] = useState(); + const [showNoCurrentCycleMessage, setShowNoCurrentCycleMessage] = useState(true); const handleDeleteCycle = (cycle: ICycle) => { setSelectedCycleForDelete({ ...cycle, actionType: "delete" }); @@ -58,6 +60,15 @@ export const CyclesList: React.FC = ({ /> ))} + ) : type === "current" ? ( + showNoCurrentCycleMessage && ( +
+

No current cycle is present.

+ +
+ ) ) : ( = (props) => { />
-

Current Cycle

+ {currentAndUpcomingCycles && currentAndUpcomingCycles.current_cycle.length > 0 && ( +

Current Cycle

+ )}
= (props) => {
-

Others

+

Other Cycles