diff options
author | crupest <crupest@outlook.com> | 2023-08-02 02:52:07 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2023-08-02 02:52:07 +0800 |
commit | 645a88e7e35d15cec6106709c42b071bec045e0d (patch) | |
tree | 8c34d8ac3ba177f725e31b55bdf689a303cfee9a /FrontEnd/src/migrating/admin/AdminNav.tsx | |
parent | 0c5c9d51c51d07aecb6f4a01586c81c824141cb2 (diff) | |
download | timeline-645a88e7e35d15cec6106709c42b071bec045e0d.tar.gz timeline-645a88e7e35d15cec6106709c42b071bec045e0d.tar.bz2 timeline-645a88e7e35d15cec6106709c42b071bec045e0d.zip |
...
Diffstat (limited to 'FrontEnd/src/migrating/admin/AdminNav.tsx')
-rw-r--r-- | FrontEnd/src/migrating/admin/AdminNav.tsx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/FrontEnd/src/migrating/admin/AdminNav.tsx b/FrontEnd/src/migrating/admin/AdminNav.tsx new file mode 100644 index 00000000..b7385e5c --- /dev/null +++ b/FrontEnd/src/migrating/admin/AdminNav.tsx @@ -0,0 +1,29 @@ +import { useLocation } from "react-router-dom"; + +import Tabs from "../common/tab/Tabs"; + +export function AdminNav({ className }: { className?: string }) { + const location = useLocation(); + const name = location.pathname.split("/")[2] ?? "user"; + + return ( + <Tabs + className={className} + activeTabName={name} + tabs={[ + { + name: "user", + text: "admin:nav.users", + link: "/admin/user", + }, + { + name: "more", + text: "admin:nav.more", + link: "/admin/more", + }, + ]} + /> + ); +} + +export default AdminNav; |