update
This commit is contained in:
parent
7d465ca568
commit
2173394a71
10
index.html
10
index.html
|
@ -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>
|
||||
|
|
18
src/App.tsx
18
src/App.tsx
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue