text: import React, { Fragment } from "react";
  import { BrowserRouter, Route, Routes, Navigate } from "react-router-dom";
  import LoginForm from "./Components/Login/LoginForm";
  import SignupForm from "./Components/Signup/SignupForm";
  import HomePage from "./pages/HomePage";
  import PrivateRoutes from "./Routes/PrivateRoutes";
  import PublicRoutes from "./Routes/PublicRoutes";
  import NotFound from "./pages/NotFound";
  import axios from "axios";
  
  import "../src/assets/css/Auth.css";
  import "../src/assets/css/Dashboard.css";
  
  axios.defaults.baseURL = "http://socialy.test/";
  axios.defaults.headers.post["Content-Type"] = "application/json";
  axios.defaults.headers.post["Accept"] = "application/json";
  
  axios.interceptors.request.use(function (config) {
      const token = localStorage.getItem("auth_token");
      config.headers.Authorization = token ? `Bearer ${token}` : "";
      return config;
  });
  
  axios.defaults.withCredentials = true;
  
  function App() {
      return (
          <BrowserRouter>
              <Routes>
                  <Route
                      path="/register"
                      element={
                          <PublicRoutes>
                              <SignupForm />
                          </PublicRoutes>
                      }
                  />
                  <Route
                      path="/"
                      element={
                          <PublicRoutes>
                              <LoginForm />
                          </PublicRoutes>
                      }
                  />
  
                  <Route
                      path="/homepage"
                      element={
                          <PrivateRoutes>
                              <HomePage />
                          </PrivateRoutes>
                      }
                  />
  
                  <Route path="*" element={<NotFound />} />
              </Routes>
          </BrowserRouter>
      );
  }
  
  export default App;
  