From 4e9149a27cf46491e08056420bad61cc42d34ea3 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Thu, 9 Mar 2023 22:49:03 +0530 Subject: [PATCH] style: empty cycle state (#410) --- apps/app/components/cycles/cycles-list.tsx | 20 +----- apps/app/components/cycles/empty-cycle.tsx | 78 ++++++++++++++++++++++ apps/app/components/cycles/index.ts | 1 + 3 files changed, 82 insertions(+), 17 deletions(-) create mode 100644 apps/app/components/cycles/empty-cycle.tsx diff --git a/apps/app/components/cycles/cycles-list.tsx b/apps/app/components/cycles/cycles-list.tsx index 97701202c..d26292a66 100644 --- a/apps/app/components/cycles/cycles-list.tsx +++ b/apps/app/components/cycles/cycles-list.tsx @@ -1,12 +1,10 @@ import { useState } from "react"; // components -import { DeleteCycleModal, SingleCycleCard } from "components/cycles"; -// icons -import { CompletedCycleIcon, CurrentCycleIcon, UpcomingCycleIcon } from "components/icons"; +import { DeleteCycleModal, EmptyCycle, SingleCycleCard } from "components/cycles"; +import { Loader } from "components/ui"; // types import { ICycle, SelectCycleType } from "types"; -import { Loader } from "components/ui"; type TCycleStatsViewProps = { cycles: ICycle[] | undefined; @@ -58,19 +56,7 @@ export const CyclesList: React.FC = ({ ))} ) : ( -
- {type === "upcoming" ? ( - - ) : type === "draft" ? ( - - ) : ( - - )} -

- No {type} {type === "current" ? "cycle" : "cycles"} yet. Create with{" "} -
Q
. -

-
+ ) ) : ( diff --git a/apps/app/components/cycles/empty-cycle.tsx b/apps/app/components/cycles/empty-cycle.tsx new file mode 100644 index 000000000..dfefa4011 --- /dev/null +++ b/apps/app/components/cycles/empty-cycle.tsx @@ -0,0 +1,78 @@ +import React from "react"; +import { LinearProgressIndicator } from "components/ui"; + +export const EmptyCycle = () => { + const emptyCycleData = [ + { + id: 1, + name: "backlog", + value: 20, + color: "#DEE2E6", + }, + { + id: 2, + name: "unstarted", + value: 14, + color: "#26B5CE", + }, + { + id: 3, + name: "started", + value: 27, + color: "#F7AE59", + }, + { + id: 4, + name: "cancelled", + value: 15, + color: "#D687FF", + }, + { + id: 5, + name: "completed", + value: 14, + color: "#09A953", + }, + ]; + return ( +
+
+
+
+ Cycle Name +
+ + +
+
+ +
+ +
+
+ +
+
+ Cycle Name +
+ + +
+
+ +
+ +
+
+
+ +
+

Create New Cycle

+

+ Sprint more effectively with Cycles by confining your project
to a fixed amount of + time. Create new cycle now. +

+
+
+ ); +}; diff --git a/apps/app/components/cycles/index.ts b/apps/app/components/cycles/index.ts index d1fd0d6b6..082070eb0 100644 --- a/apps/app/components/cycles/index.ts +++ b/apps/app/components/cycles/index.ts @@ -6,3 +6,4 @@ export * from "./modal"; export * from "./select"; export * from "./sidebar"; export * from "./single-cycle-card"; +export * from "./empty-cycle";