From f451000f281a4c9c44caf4dc835d3b2fdb55fa81 Mon Sep 17 00:00:00 2001
From: crupest <crupest@outlook.com>
Date: Sun, 22 Nov 2020 09:49:58 +0800
Subject: fix: Fix i18n.

---
 FrontEnd/src/app/views/admin/Admin.tsx | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

(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
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 (
-- 
cgit v1.2.3

