37 lines
1004 B
TypeScript
37 lines
1004 B
TypeScript
/*
|
|
* @LastEditors: John
|
|
* @Date: 2024-05-22 18:06:14
|
|
* @LastEditTime: 2024-06-06 16:49:46
|
|
* @Author: John
|
|
*/
|
|
import "./App.css";
|
|
import { useEffect } from "react";
|
|
import { HashRouter as Router, Route, Routes } from "react-router-dom";
|
|
import SignIn from "./pages/SignIn";
|
|
import Download from "./pages/Download";
|
|
import SelectCountry from "./pages/SelectCountry";
|
|
import { useTranslation } from "react-i18next";
|
|
import Auth from "./pages/Auth";
|
|
|
|
function App() {
|
|
const { i18n } = useTranslation();
|
|
const lang: string = navigator.language.split("-")[1].toLocaleLowerCase();
|
|
useEffect(() => {
|
|
i18n.changeLanguage("en");
|
|
}, [i18n, lang]);
|
|
return (
|
|
<Router>
|
|
<div>
|
|
<Routes>
|
|
<Route path="/" Component={SignIn} />
|
|
<Route path="/Download" Component={Download} />
|
|
<Route path="/SelectCountry" Component={SelectCountry} />
|
|
<Route path="/Auth" Component={Auth} />
|
|
</Routes>
|
|
</div>
|
|
</Router>
|
|
);
|
|
}
|
|
|
|
export default App;
|