import { StrictMode } from "react";
import { createRoot } from "react-dom/client";
import { BrowserRouter, Navigate, Route, Routes } from "react-router-dom";
import App from "./App.tsx";
import AgreementPage from "./pages/Agreement/index.tsx";
import PrivacyPage from "./pages/Privacy/index.tsx";
import ContactPage from "./pages/Solution/ContactPage.tsx";
import HomePage from "./pages/zjy/HomePage.tsx";
import "./index.css";

createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <BrowserRouter>
      <Routes>
        <Route path="/agreement" element={<AgreementPage />} />
        <Route path="/privacy" element={<PrivacyPage />} />
        <Route path="/" element={<App />}>
          <Route index element={<HomePage />} />
          <Route path="contact" element={<ContactPage />} />
          <Route path="*" element={<Navigate to="/" replace />} />
        </Route>
      </Routes>
    </BrowserRouter>
  </StrictMode>,
);
