From 47587812b809fee2a95c76266d9d0e42fc4ac1ca Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Tue, 15 Jun 2021 14:14:28 +0800
Subject: ...

---
 FrontEnd/src/app/views/admin/Admin.tsx | 48 ----------------------------------
 1 file changed, 48 deletions(-)
 delete mode 100644 FrontEnd/src/app/views/admin/Admin.tsx

(limited to 'FrontEnd/src/app/views/admin/Admin.tsx')

diff --git a/FrontEnd/src/app/views/admin/Admin.tsx b/FrontEnd/src/app/views/admin/Admin.tsx
deleted file mode 100644
index 0b6d1f05..00000000
--- a/FrontEnd/src/app/views/admin/Admin.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import React, { Fragment } from "react";
-import { Redirect, Route, Switch, useRouteMatch, match } from "react-router";
-import { Container } from "react-bootstrap";
-import { useTranslation } from "react-i18next";
-
-import { AuthUser } from "@/services/user";
-
-import AdminNav from "./AdminNav";
-import UserAdmin from "./UserAdmin";
-import MoreAdmin from "./MoreAdmin";
-
-interface AdminProps {
-  user: AuthUser;
-}
-
-const Admin: React.FC<AdminProps> = ({ user }) => {
-  useTranslation("admin");
-
-  const match = useRouteMatch();
-
-  return (
-    <Fragment>
-      <Switch>
-        <Redirect from={match.path} to={`${match.path}/users`} exact />
-        <Route path={`${match.path}/:name`}>
-          {(p) => {
-            const match = p.match as match<{ name: string }>;
-            const name = match.params["name"];
-            return (
-              <Container>
-                <AdminNav />
-                {(() => {
-                  if (name === "users") {
-                    return <UserAdmin user={user} />;
-                  } else if (name === "more") {
-                    return <MoreAdmin user={user} />;
-                  }
-                })()}
-              </Container>
-            );
-          }}
-        </Route>
-      </Switch>
-    </Fragment>
-  );
-};
-
-export default Admin;
-- 
cgit v1.2.3

