From 99ae27755c21ef51421c4598cad7c89a020a8322 Mon Sep 17 00:00:00 2001 From: Rafal Czajkowski Date: Wed, 15 May 2024 19:03:21 +0200 Subject: [PATCH] Fix displaying activity items --- .../components/shared/ActivitiesList/ActivitiesList.tsx | 2 +- .../shared/ActivitiesList/ActivitiesListItem.tsx | 9 ++++++--- dapp/src/types/activity.ts | 1 + 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dapp/src/components/shared/ActivitiesList/ActivitiesList.tsx b/dapp/src/components/shared/ActivitiesList/ActivitiesList.tsx index 755d2857f..79b2ef852 100644 --- a/dapp/src/components/shared/ActivitiesList/ActivitiesList.tsx +++ b/dapp/src/components/shared/ActivitiesList/ActivitiesList.tsx @@ -26,7 +26,7 @@ function ActivitiesList(props: ListProps) { return activities.length > 0 ? ( {activities.map((item) => ( - + {!dismissedActivities.includes(item.txHash) && ( & function ActivitiesListItem(props: ActivitiesListItemProps) { const { amount, status, txHash, type, handleDismiss, ...restProps } = props + const isCompleted = status === DepositStatus.Finalized + return ( - {status === "completed" + {isCompleted ? `${type === "withdraw" ? "Unstaking" : "Staking"} completed` : `${type === "withdraw" ? "Unstaking" : "Staking"}...`} @@ -43,7 +46,7 @@ function ActivitiesListItem(props: ActivitiesListItemProps) { - {status === "completed" ? ( + {isCompleted ? (