From c921d0823803e7333b33429464de9610a1cb2341 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Thu, 24 Nov 2022 13:31:30 +0200 Subject: [PATCH] fixes --- src/App.js | 21 +++++++++++++++++---- src/components/TitledPage.js | 14 ++++++++++++++ src/pages/Empty.js | 13 ------------- src/pages/Home.js | 13 +++++-------- src/pages/Users.js | 24 ++++++++---------------- 5 files changed, 44 insertions(+), 41 deletions(-) create mode 100644 src/components/TitledPage.js delete mode 100644 src/pages/Empty.js diff --git a/src/App.js b/src/App.js index e6d99bc..f9a6562 100644 --- a/src/App.js +++ b/src/App.js @@ -13,6 +13,7 @@ import PrivateRoute from './structures/PrivateRoute'; import { UnauthedRoute } from './structures/UnauthedRoute'; import Users from './pages/Users'; import Admin from './pages/Admin'; +import TitledPage from './components/TitledPage'; function App() { @@ -56,10 +57,22 @@ function App() {
- } /> - } /> - } /> - } /> + + + + + } /> + + + + + } /> + + + } /> + + + } /> } /> diff --git a/src/components/TitledPage.js b/src/components/TitledPage.js new file mode 100644 index 0000000..900b53e --- /dev/null +++ b/src/components/TitledPage.js @@ -0,0 +1,14 @@ +import React from "react"; +import '../css/pages/Empty.css'; + +const TitledPage = ({title, children}) => { + + return
+

{title}

+
+ {children} +
+
; +}; + +export default TitledPage; \ No newline at end of file diff --git a/src/pages/Empty.js b/src/pages/Empty.js deleted file mode 100644 index 07a37bb..0000000 --- a/src/pages/Empty.js +++ /dev/null @@ -1,13 +0,0 @@ -import React from "react"; -import '../css/pages/Empty.css'; - -const Empty = () => { - - return
-

Empty

-
-
-
; -}; - -export default Empty; \ No newline at end of file diff --git a/src/pages/Home.js b/src/pages/Home.js index 6cf75ac..c87a5f1 100644 --- a/src/pages/Home.js +++ b/src/pages/Home.js @@ -5,14 +5,11 @@ import { get } from "../util/Util"; const Home = () => { return
-

Home

-
- -
+
; }; diff --git a/src/pages/Users.js b/src/pages/Users.js index e741773..ce2ad7e 100644 --- a/src/pages/Users.js +++ b/src/pages/Users.js @@ -186,7 +186,7 @@ const CreateUserField = () => { - +
; @@ -245,22 +245,14 @@ const Users = () => { ; }; - return
-

Users

+ return
{error &&

{error}

} - -
-
- - - } /> - } /> - - -
- -
- + + + } /> + } /> + +
; };