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">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/src/assets/img/logo.png" />
|
<link rel="icon" type="image/svg+xml" href="/src/assets/img/logo.png" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>Pineer</title>
|
<title>Pioneer</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<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 "./App.css";
|
||||||
import { useEffect } from "react";
|
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 SignIn from "./pages/SignIn";
|
||||||
import Download from "./pages/Download";
|
import Download from "./pages/Download";
|
||||||
import SelectCountry from "./pages/SelectCountry";
|
import SelectCountry from "./pages/SelectCountry";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const {i18n} = useTranslation()
|
const { i18n } = useTranslation();
|
||||||
const lang:string = navigator.language.split('-')[1].toLocaleLowerCase()
|
const lang: string = navigator.language.split("-")[1].toLocaleLowerCase();
|
||||||
useEffect(()=>{
|
useEffect(() => {
|
||||||
i18n.changeLanguage('en')
|
i18n.changeLanguage("en");
|
||||||
},[ i18n,lang])
|
}, [i18n, lang]);
|
||||||
return (
|
return (
|
||||||
<Router>
|
<Router>
|
||||||
<div>
|
<div>
|
||||||
|
|
Loading…
Reference in New Issue