diff --git a/src/components/DeleteUserModal.tsx b/src/components/DeleteUserModal.tsx index 5b388673..dd201750 100644 --- a/src/components/DeleteUserModal.tsx +++ b/src/components/DeleteUserModal.tsx @@ -41,18 +41,16 @@ const DeleteUserModal: React.FC = ({ centers, userId, userName, - userType, + userType }) => { - console.log(centers); + console.log(centers) const { t } = useTranslation(); const theme = useTheme(); const reasons = [ { value: "Incorrect Data Entry", label: t("COMMON.INCORRECT_DATA_ENTRY") }, { value: "Duplicated User", label: t("COMMON.DUPLICATED_USER") }, ]; - const [checkedCohortDeletion, setCheckedCohortDeletion] = useState( - centers === "-" ? true : false - ); + const [checkedCohortDeletion, setCheckedCohortDeletion] = useState(centers === "-" ? true : false); useEffect(() => { if (centers === "-") { @@ -91,7 +89,7 @@ const DeleteUserModal: React.FC = ({ return ( = ({ variant="body1" sx={{ marginBottom: "12px", fontWeight: "bold", color: "#333" }} > - {userType === Role.TEAM_LEADERS - ? t("COMMON.USER_BLOCK", { name: userName }) - : centers.split(", ").length === 1 - ? t("COMMON.USER_CENTER", { name: userName }) - : t("COMMON.USER_CENTERS", { name: userName })} + {userType===Role.TEAM_LEADERS?t("COMMON.USER_BLOCK", { name: userName }): centers.split(', ').length===1 ? t("COMMON.USER_CENTER", { name: userName }) : t("COMMON.USER_CENTERS", { name: userName })} = ({ color="primary" /> } - label={ - userType === Role.TEAM_LEADERS - ? t("COMMON.DELETE_FROM_BLOCK_WARNING") - : centers.split(", ").length === 1 - ? t("COMMON.DELETE_FROM_CENTER_WARNING") - : t("COMMON.DELETE_FROM_CENTERS_WARNING") - } + label={userType===Role.TEAM_LEADERS?t("COMMON.DELETE_FROM_BLOCK_WARNING"): centers.split(', ').length===1 ? t("COMMON.DELETE_FROM_CENTER_WARNING") : t("COMMON.DELETE_FROM_CENTERS_WARNING")} + sx={{ marginTop: "12px", color: "#555" }} /> @@ -194,4 +183,4 @@ const DeleteUserModal: React.FC = ({ ); }; -export default DeleteUserModal; +export default DeleteUserModal; \ No newline at end of file