From a0b8f7188ff54be15ec6d11fcf2a7028b7a21457 Mon Sep 17 00:00:00 2001 From: Anmol Singh Bhatia <121005188+anmolsinghbhatia@users.noreply.github.com> Date: Fri, 14 Apr 2023 16:03:11 +0530 Subject: [PATCH] fix: cycle card (#825) --- .../components/cycles/single-cycle-card.tsx | 179 ++++++++++-------- 1 file changed, 101 insertions(+), 78 deletions(-) diff --git a/apps/app/components/cycles/single-cycle-card.tsx b/apps/app/components/cycles/single-cycle-card.tsx index a5d2d3745..c14617ee7 100644 --- a/apps/app/components/cycles/single-cycle-card.tsx +++ b/apps/app/components/cycles/single-cycle-card.tsx @@ -239,91 +239,114 @@ export const SingleCycleCard: React.FC = ({ return (
-
-
- - - + + +
+
+

{truncateText(cycle.name, 75)}

-
- - - {cycle.is_favorite ? ( - - ) : ( - - )} -
+ + {cycle.is_favorite ? ( + + ) : ( + + )} +
-
-
- - Start : - {renderShortDateWithYearFormat(startDate)} +
+
+ + Start : + {renderShortDateWithYearFormat(startDate)} +
+
+ + End : + {renderShortDateWithYearFormat(endDate)} +
+
+ +
+
+ {cycle.owned_by.avatar && cycle.owned_by.avatar !== "" ? ( + {cycle.owned_by.first_name} + ) : ( + + {cycle.owned_by.first_name.charAt(0)} + + )} + {cycle.owned_by.first_name} +
+
+ {!isCompleted && ( + + )} + + + {!isCompleted && ( + { + e.preventDefault(); + handleDeleteCycle(); + }} + > + + + Delete cycle + + + )} + { + e.preventDefault(); + handleCopyText(); + }} + > + + + Copy cycle link + + + +
+
-
- - End : - {renderShortDateWithYearFormat(endDate)} -
-
-
+ +
-
-
- {cycle.owned_by.avatar && cycle.owned_by.avatar !== "" ? ( - {cycle.owned_by.first_name} - ) : ( - - {cycle.owned_by.first_name.charAt(0)} - - )} - {cycle.owned_by.first_name} -
-
- {!isCompleted && ( - - )} - - - {!isCompleted && ( - - - - Delete cycle - - - )} - - - - Copy cycle link - - - -
-
- {({ open }) => (