From 3aa87cc26fd58836b82c067b58a47e08e30a7784 Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Thu, 4 Jun 2020 00:18:50 +0800
Subject: refactor(front): Make codes lint-clean!

---
 Timeline/ClientApp/src/timeline/TimelineDeleteDialog.tsx | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

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

diff --git a/Timeline/ClientApp/src/timeline/TimelineDeleteDialog.tsx b/Timeline/ClientApp/src/timeline/TimelineDeleteDialog.tsx
index 2b682a6b..e2d8ad5a 100644
--- a/Timeline/ClientApp/src/timeline/TimelineDeleteDialog.tsx
+++ b/Timeline/ClientApp/src/timeline/TimelineDeleteDialog.tsx
@@ -4,7 +4,7 @@ import { useHistory } from 'react-router';
 import { Trans } from 'react-i18next';
 
 import { apiBaseUrl } from '../config';
-import { useUser } from '../data/user';
+import { useUserLoggedIn } from '../data/user';
 import OperationDialog from '../common/OperationDialog';
 
 interface TimelineDeleteDialog {
@@ -13,8 +13,8 @@ interface TimelineDeleteDialog {
   close: () => void;
 }
 
-const TimelineDeleteDialog: React.FC<TimelineDeleteDialog> = props => {
-  const user = useUser()!;
+const TimelineDeleteDialog: React.FC<TimelineDeleteDialog> = (props) => {
+  const user = useUserLoggedIn();
   const history = useHistory();
 
   const { name } = props;
@@ -35,14 +35,14 @@ const TimelineDeleteDialog: React.FC<TimelineDeleteDialog> = props => {
       inputScheme={[
         {
           type: 'text',
-          validator: value => {
+          validator: (value) => {
             if (value !== name) {
               return 'timeline.deleteDialog.notMatch';
             } else {
               return null;
             }
-          }
-        }
+          },
+        },
       ]}
       onProcess={() => {
         return axios.delete(
-- 
cgit v1.2.3

