From 07d19ad3260ddcd3a7c45d29923af3b95f61b5b4 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Fri, 10 Apr 2020 10:11:15 -0700 Subject: [PATCH] Code cleanup and formatting --- resources/scripts/components/App.tsx | 22 +++++----- .../server/backups/BackupContextMenu.tsx | 21 +++++---- resources/scripts/routers/ServerRouter.tsx | 44 +++++++++---------- 3 files changed, 44 insertions(+), 43 deletions(-) diff --git a/resources/scripts/components/App.tsx b/resources/scripts/components/App.tsx index 510835678..fb813b361 100644 --- a/resources/scripts/components/App.tsx +++ b/resources/scripts/components/App.tsx @@ -1,6 +1,6 @@ import * as React from 'react'; import { hot } from 'react-hot-loader/root'; -import { BrowserRouter, BrowserRouter as Router, Route, Switch } from 'react-router-dom'; +import { BrowserRouter, Route, Switch } from 'react-router-dom'; import { StoreProvider } from 'easy-peasy'; import { store } from '@/state'; import DashboardRouter from '@/routers/DashboardRouter'; @@ -57,17 +57,15 @@ const App = () => { - -
- - - - - - - -
-
+
+ + + + + + + +
diff --git a/resources/scripts/components/server/backups/BackupContextMenu.tsx b/resources/scripts/components/server/backups/BackupContextMenu.tsx index 31ce9f9af..16b636e51 100644 --- a/resources/scripts/components/server/backups/BackupContextMenu.tsx +++ b/resources/scripts/components/server/backups/BackupContextMenu.tsx @@ -15,6 +15,7 @@ import useServer from '@/plugins/useServer'; import deleteBackup from '@/api/server/backups/deleteBackup'; import { ServerContext } from '@/state/server'; import ConfirmationModal from '@/components/elements/ConfirmationModal'; +import Can from '@/components/elements/Can'; interface Props { backup: ServerBackup; @@ -90,18 +91,22 @@ export default ({ backup }: Props) => { )} >
- doDownload()}> - - Download - + + doDownload()}> + + Download + + setVisible(true)}> Checksum - setDeleteVisible(true)}> - - Delete - + + setDeleteVisible(true)}> + + Delete + +
diff --git a/resources/scripts/routers/ServerRouter.tsx b/resources/scripts/routers/ServerRouter.tsx index ce592dfeb..c35614d06 100644 --- a/resources/scripts/routers/ServerRouter.tsx +++ b/resources/scripts/routers/ServerRouter.tsx @@ -30,7 +30,7 @@ const ServerRouter = ({ match, location }: RouteComponentProps<{ id: string }>) useEffect(() => () => clearServerState(), [ clearServerState ]); return ( - +
@@ -51,7 +51,7 @@ const ServerRouter = ({ match, location }: RouteComponentProps<{ id: string }>) Backups - + Settings
@@ -64,27 +64,25 @@ const ServerRouter = ({ match, location }: RouteComponentProps<{ id: string }>) : - - - - - ( - - - - )} - exact - /> - - - - - - - - + + + + ( + + + + )} + exact + /> + + + + + + + }