7dc8a49a8d
- package.json -> Imported packages i18next & react-i18next for multilingual functionality. - src/App.jsx -> Imported LanguageSwitcher from ./components/LanguageSwitcher and added <LanguageSwitcher /> component at the beginning of layout so it's always visible. - src/components/LanguageSwitcher.jsx -> LanguageSwitcher component, consists of a dropdown menu that always appears at top right corner for choosing language. - src/i18n.js -> Initialize and configure i18next for app-wide multilingual support. - src/locales/en.json + src/locales/fr.json -> Empty json files that will soon contain translation key:value pairs for each page. - src/main.jsx -> Imported src/i18n.js for multilingual functionality.
26 lines
905 B
React
26 lines
905 B
React
import "./App.css";
|
|
import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
|
|
import LanguageSwitcher from './components/LanguageSwitcher'; // Language switcher dropdown menu
|
|
import Login from "./pages/Authentication/Login";
|
|
import SignUp from "./pages/Authentication/SignUp";
|
|
import DrivethruLandingPage from "./pages/UserPages/DrivethruLandingPage";
|
|
import Dashboard from "./pages/UserPages/Dashboard";
|
|
import NotFoundPage from "./pages/UserPages/NotFoundPage";
|
|
|
|
function App() {
|
|
return (
|
|
<Router>
|
|
<LanguageSwitcher />
|
|
<Routes>
|
|
<Route path="/" element={<DrivethruLandingPage />} />
|
|
<Route path="/login" element={<Login />} />
|
|
<Route path="/signup" element={<SignUp />} />
|
|
<Route path="/Dashboard" element={<Dashboard />} />
|
|
<Route path="*" element={<NotFoundPage />} />
|
|
</Routes>
|
|
</Router>
|
|
);
|
|
}
|
|
|
|
export default App;
|