WIP: i18n implementation - fix items.json syntax, add useTranslation hooks to components

This commit is contained in:
Joan
2026-01-07 15:12:01 +01:00
parent ea594f80c6
commit dc438ae4c1
5 changed files with 29 additions and 362 deletions

View File

@@ -1,4 +1,4 @@
import { HashRouter as Router, Routes, Route, Navigate } from 'react-router-dom'
import { BrowserRouter, HashRouter, Routes, Route, Navigate } from 'react-router-dom'
import { AuthProvider } from './contexts/AuthContext'
import { useAuth } from './hooks/useAuth'
import LandingPage from './components/LandingPage'
@@ -13,6 +13,10 @@ import GameLayout from './components/GameLayout'
import AccountPage from './components/AccountPage'
import './App.css'
// Use HashRouter for Electron (file:// protocol), BrowserRouter for web
const isElectron = window.location.protocol === 'file:'
const Router = isElectron ? HashRouter : BrowserRouter
function PrivateRoute({ children }: { children: React.ReactNode }) {
const { isAuthenticated, loading } = useAuth()