This commit is contained in:
john 2024-05-22 18:47:27 +08:00
parent 7d465ca568
commit 2173394a71
2 changed files with 20 additions and 8 deletions

View File

@ -1,10 +1,16 @@
<!doctype html>
<!--
* @LastEditors: John
* @Date: 2024-05-22 18:06:14
* @LastEditTime: 2024-05-22 18:43:14
* @Author: John
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/src/assets/img/logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pineer</title>
<title>Pioneer</title>
</head>
<body>
<div id="root"></div>

View File

@ -1,17 +1,23 @@
/*
* @LastEditors: John
* @Date: 2024-05-22 18:06:14
* @LastEditTime: 2024-05-22 18:45:10
* @Author: John
*/
import "./App.css";
import { useEffect } from "react";
import { BrowserRouter as Router, Route, Routes } from "react-router-dom";
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";
function App() {
const {i18n} = useTranslation()
const lang:string = navigator.language.split('-')[1].toLocaleLowerCase()
useEffect(()=>{
i18n.changeLanguage('en')
},[ i18n,lang])
const { i18n } = useTranslation();
const lang: string = navigator.language.split("-")[1].toLocaleLowerCase();
useEffect(() => {
i18n.changeLanguage("en");
}, [i18n, lang]);
return (
<Router>
<div>