PageTitle
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite + React + TS</title>
|
||||
<title>GuestBook</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -18,11 +18,13 @@
|
||||
"@tanstack/react-form": "^0.26.4",
|
||||
"@tanstack/react-query": "^5.51.11",
|
||||
"@tanstack/react-router": "^1.45.8",
|
||||
"@types/react-helmet": "^6.1.11",
|
||||
"i18next": "^23.12.2",
|
||||
"i18next-browser-languagedetector": "^8.0.0",
|
||||
"i18next-http-backend": "^2.5.2",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-helmet": "^6.1.0",
|
||||
"react-i18next": "^15.0.0",
|
||||
"zustand": "^4.5.4"
|
||||
},
|
||||
|
||||
Generated
+40
@@ -32,6 +32,9 @@ importers:
|
||||
'@tanstack/react-router':
|
||||
specifier: ^1.45.8
|
||||
version: 1.45.8(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
'@types/react-helmet':
|
||||
specifier: ^6.1.11
|
||||
version: 6.1.11
|
||||
i18next:
|
||||
specifier: ^23.12.2
|
||||
version: 23.12.2
|
||||
@@ -47,6 +50,9 @@ importers:
|
||||
react-dom:
|
||||
specifier: ^18.3.1
|
||||
version: 18.3.1(react@18.3.1)
|
||||
react-helmet:
|
||||
specifier: ^6.1.0
|
||||
version: 6.1.0(react@18.3.1)
|
||||
react-i18next:
|
||||
specifier: ^15.0.0
|
||||
version: 15.0.0(i18next@23.12.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
|
||||
@@ -818,6 +824,9 @@ packages:
|
||||
'@types/react-dom@18.3.0':
|
||||
resolution: {integrity: sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==}
|
||||
|
||||
'@types/react-helmet@6.1.11':
|
||||
resolution: {integrity: sha512-0QcdGLddTERotCXo3VFlUSWO3ztraw8nZ6e3zJSgG7apwV5xt+pJUS8ewPBqT4NYB1optGLprNQzFleIY84u/g==}
|
||||
|
||||
'@types/react-transition-group@4.4.10':
|
||||
resolution: {integrity: sha512-hT/+s0VQs2ojCX823m60m5f0sL5idt9SO6Tj6Dg+rdphGPIeJbJ6CxvBYkgkGKrYeDjvIpKTR38UzmtHJOGW3Q==}
|
||||
|
||||
@@ -1618,6 +1627,14 @@ packages:
|
||||
peerDependencies:
|
||||
react: ^18.3.1
|
||||
|
||||
react-fast-compare@3.2.2:
|
||||
resolution: {integrity: sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==}
|
||||
|
||||
react-helmet@6.1.0:
|
||||
resolution: {integrity: sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==}
|
||||
peerDependencies:
|
||||
react: '>=16.3.0'
|
||||
|
||||
react-i18next@15.0.0:
|
||||
resolution: {integrity: sha512-2O3IgF4zivg57Q6p6i+ChDgJ371IDcEWbuWC6gvoh5NbkDMs0Q+O7RPr4v61+Se32E0V+LmtwePAeqWZW0bi6g==}
|
||||
peerDependencies:
|
||||
@@ -1641,6 +1658,11 @@ packages:
|
||||
resolution: {integrity: sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
react-side-effect@2.1.2:
|
||||
resolution: {integrity: sha512-PVjOcvVOyIILrYoyGEpDN3vmYNLdy1CajSFNt4TDsVQC5KpTijDvWVoR+/7Rz2xT978D8/ZtFceXxzsPwZEDvw==}
|
||||
peerDependencies:
|
||||
react: ^16.3.0 || ^17.0.0 || ^18.0.0
|
||||
|
||||
react-transition-group@4.4.5:
|
||||
resolution: {integrity: sha512-pZcd1MCJoiKiBR2NRxeCRg13uCXbydPnmB4EOeRrY7480qNWO8IIgQG6zlDkm6uRMsURXPuKq0GWtiM59a5Q6g==}
|
||||
peerDependencies:
|
||||
@@ -2678,6 +2700,10 @@ snapshots:
|
||||
dependencies:
|
||||
'@types/react': 18.3.3
|
||||
|
||||
'@types/react-helmet@6.1.11':
|
||||
dependencies:
|
||||
'@types/react': 18.3.3
|
||||
|
||||
'@types/react-transition-group@4.4.10':
|
||||
dependencies:
|
||||
'@types/react': 18.3.3
|
||||
@@ -3519,6 +3545,16 @@ snapshots:
|
||||
react: 18.3.1
|
||||
scheduler: 0.23.2
|
||||
|
||||
react-fast-compare@3.2.2: {}
|
||||
|
||||
react-helmet@6.1.0(react@18.3.1):
|
||||
dependencies:
|
||||
object-assign: 4.1.1
|
||||
prop-types: 15.8.1
|
||||
react: 18.3.1
|
||||
react-fast-compare: 3.2.2
|
||||
react-side-effect: 2.1.2(react@18.3.1)
|
||||
|
||||
react-i18next@15.0.0(i18next@23.12.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
|
||||
dependencies:
|
||||
'@babel/runtime': 7.24.8
|
||||
@@ -3534,6 +3570,10 @@ snapshots:
|
||||
|
||||
react-refresh@0.14.2: {}
|
||||
|
||||
react-side-effect@2.1.2(react@18.3.1):
|
||||
dependencies:
|
||||
react: 18.3.1
|
||||
|
||||
react-transition-group@4.4.5(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
|
||||
dependencies:
|
||||
'@babel/runtime': 7.24.8
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { CssBaseline, ThemeProvider, useMediaQuery } from '@mui/material';
|
||||
import { FC, useMemo } from 'react';
|
||||
import { Helmet } from 'react-helmet';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import Router from './router';
|
||||
import useGuestBookStore from './store/store';
|
||||
import darkTheme from './theme/dark/dark';
|
||||
@@ -8,6 +10,7 @@ import lightTheme from './theme/light/light';
|
||||
const App: FC = () => {
|
||||
const prefersDarkMode = useMediaQuery('(prefers-color-scheme: dark)');
|
||||
const theme = useGuestBookStore((state) => state.theme);
|
||||
const { t } = useTranslation();
|
||||
|
||||
const themePreset = useMemo(() => {
|
||||
if (theme === 'dark' || prefersDarkMode) return darkTheme;
|
||||
@@ -17,6 +20,9 @@ const App: FC = () => {
|
||||
|
||||
return (
|
||||
<ThemeProvider theme={themePreset}>
|
||||
<Helmet>
|
||||
<title>{t('GuestBook')}</title>
|
||||
</Helmet>
|
||||
<CssBaseline />
|
||||
<Router />
|
||||
</ThemeProvider>
|
||||
|
||||
Reference in New Issue
Block a user