pioneer-share/src/App.tsx

35 lines
921 B
TypeScript
Raw Normal View History

2024-05-22 18:47:27 +08:00
/*
* @LastEditors: John
* @Date: 2024-05-22 18:06:14
* @LastEditTime: 2024-05-22 18:45:10
* @Author: John
*/
2024-01-31 10:28:31 +08:00
import "./App.css";
import { useEffect } from "react";
2024-05-22 18:47:27 +08:00
import { HashRouter as Router, Route, Routes } from "react-router-dom";
2024-01-31 10:28:31 +08:00
import SignIn from "./pages/SignIn";
import Download from "./pages/Download";
import SelectCountry from "./pages/SelectCountry";
import { useTranslation } from "react-i18next";
function App() {
2024-05-22 18:47:27 +08:00
const { i18n } = useTranslation();
const lang: string = navigator.language.split("-")[1].toLocaleLowerCase();
useEffect(() => {
i18n.changeLanguage("en");
}, [i18n, lang]);
2024-01-31 10:28:31 +08:00
return (
<Router>
<div>
<Routes>
<Route path="/" Component={SignIn} />
<Route path="/Download" Component={Download} />
<Route path="/SelectCountry" Component={SelectCountry} />
</Routes>
</div>
</Router>
);
}
export default App;