From a314b5350e269676e8c39eda4cc7842751b1a7fc Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Tue, 1 Sep 2020 02:32:06 +0800
Subject: ...

---
 .../src/app/timeline/TimelineDeleteDialog.tsx      | 54 ----------------------
 1 file changed, 54 deletions(-)
 delete mode 100644 Timeline/ClientApp/src/app/timeline/TimelineDeleteDialog.tsx

(limited to 'Timeline/ClientApp/src/app/timeline/TimelineDeleteDialog.tsx')

diff --git a/Timeline/ClientApp/src/app/timeline/TimelineDeleteDialog.tsx b/Timeline/ClientApp/src/app/timeline/TimelineDeleteDialog.tsx
deleted file mode 100644
index 5ebbf9df..00000000
--- a/Timeline/ClientApp/src/app/timeline/TimelineDeleteDialog.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import React from "react";
-import { useHistory } from "react-router";
-import { Trans } from "react-i18next";
-
-import OperationDialog from "../common/OperationDialog";
-import { timelineService } from "../data/timeline";
-
-interface TimelineDeleteDialog {
-  open: boolean;
-  name: string;
-  close: () => void;
-}
-
-const TimelineDeleteDialog: React.FC<TimelineDeleteDialog> = (props) => {
-  const history = useHistory();
-
-  const { name } = props;
-
-  return (
-    <OperationDialog
-      open={props.open}
-      close={props.close}
-      title="timeline.deleteDialog.title"
-      titleColor="danger"
-      inputPrompt={() => {
-        return (
-          <Trans i18nKey="timeline.deleteDialog.inputPrompt">
-            0<code className="mx-2">{{ name }}</code>2
-          </Trans>
-        );
-      }}
-      inputScheme={[
-        {
-          type: "text",
-          validator: (value) => {
-            if (value !== name) {
-              return "timeline.deleteDialog.notMatch";
-            } else {
-              return null;
-            }
-          },
-        },
-      ]}
-      onProcess={() => {
-        return timelineService.deleteTimeline(name).toPromise();
-      }}
-      onSuccessAndClose={() => {
-        history.replace("/");
-      }}
-    />
-  );
-};
-
-export default TimelineDeleteDialog;
-- 
cgit v1.2.3

