diff options
author | crupest <crupest@outlook.com> | 2020-11-22 09:49:58 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-11-22 09:49:58 +0800 |
commit | f1aabc06f1005b26bd1c0c5f36c98c28a62fc31e (patch) | |
tree | 996eed1f087a50e8d5cd865e1440f4dbb8a7873b | |
parent | 8a1f0ea162880b7a702a7ee62aa572bff936ca59 (diff) | |
download | timeline-f1aabc06f1005b26bd1c0c5f36c98c28a62fc31e.tar.gz timeline-f1aabc06f1005b26bd1c0c5f36c98c28a62fc31e.tar.bz2 timeline-f1aabc06f1005b26bd1c0c5f36c98c28a62fc31e.zip |
fix: Fix i18n.
-rw-r--r-- | FrontEnd/src/app/views/admin/Admin.tsx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/FrontEnd/src/app/views/admin/Admin.tsx b/FrontEnd/src/app/views/admin/Admin.tsx index 94e97713..446cd36d 100644 --- a/FrontEnd/src/app/views/admin/Admin.tsx +++ b/FrontEnd/src/app/views/admin/Admin.tsx @@ -1,22 +1,21 @@ 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 i18n from "@/i18n"; - import AdminNav from "./AdminNav"; import UserAdmin from "./UserAdmin"; import HighlightTimelineAdmin from "./HighlightTimelineAdmin"; -void i18n.loadNamespaces("admin"); - interface AdminProps { user: AuthUser; } const Admin: React.FC<AdminProps> = ({ user }) => { + useTranslation("admin"); + const match = useRouteMatch(); return ( |