From 0309bb0cf0c00b78c1686d428a6b3e217ff6970d Mon Sep 17 00:00:00 2001 From: Klochette Date: Wed, 13 Oct 2021 13:53:23 +0200 Subject: [PATCH] fix(app): delete retry button and add flex gap --- app/src/features/Batches/BatchListItem.tsx | 25 ++-------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/app/src/features/Batches/BatchListItem.tsx b/app/src/features/Batches/BatchListItem.tsx index 34e5a4396..ffd638867 100644 --- a/app/src/features/Batches/BatchListItem.tsx +++ b/app/src/features/Batches/BatchListItem.tsx @@ -2,12 +2,9 @@ import React from "react"; import { Link, Paper, Typography } from "@material-ui/core"; import { makeStyles } from "@material-ui/core/styles"; -import { Replay } from "@material-ui/icons"; import { DateTime } from "luxon"; -import { useSnackbar } from "notistack"; import { useTranslation } from "react-i18next"; -import Button from "common/components/Button"; import { Batch } from "services/api/generated/api.generated"; import { KIBANA_URL } from "../../constants"; @@ -30,9 +27,7 @@ const useStyles = makeStyles((theme) => ({ display: "flex", alignItems: "center", flexWrap: "wrap", - }, - margin: { - marginRight: theme.spacing(1), + gap: theme.spacing(1), }, title: { display: "flex", @@ -50,7 +45,6 @@ const BatchListItem = ({ batch }: BatchListItemType): JSX.Element => { const classes = useStyles(); const { t } = useTranslation(); const batchEnd = batch.completed_at ?? batch.canceled_at; - const { enqueueSnackbar } = useSnackbar(); const isBatchInProgress = !batch.completed_at && !batch.canceled_at; const hasBatchCompletedWithErrors = @@ -87,13 +81,6 @@ const BatchListItem = ({ batch }: BatchListItemType): JSX.Element => { const getCreatedAtDate = (date: string) => new Date(date).toLocaleString().split(",").join(" -"); - const handleBatchRetry = () => { - // TODO: batch retry is not implemented yet - enqueueSnackbar("Retrying a batch is not yet implemented !", { - variant: "warning", - }); - }; - return ( { )}
- + {getCreatedAtDate(batch.created_at)} - {isBatchRunning && }