diff --git a/Client/src/App.jsx b/Client/src/App.jsx index be667395a..193fbcb36 100644 --- a/Client/src/App.jsx +++ b/Client/src/App.jsx @@ -20,10 +20,26 @@ import NewPasswordConfirmed from "./Pages/NewPasswordConfirmed"; import ToastComponent from "./Components/Toast"; import ProtectedRoute from "./Components/ProtectedRoute"; import { useState, useEffect } from "react"; +import axios from "axios"; function App() { + const BASE_URL = import.meta.env.VITE_APP_API_BASE_URL; const [adminExists, setAdminExists] = useState(false); // Assuming admin exists by default + useEffect(() => { + const checkAdminExists = async () => { + try { + // Replace this URL with your actual API endpoint + const response = await axios.get(`${BASE_URL}/auth/users/admin`); + console.log(response); + } catch (error) { + console.error("Failed to check admin existence:", error); + } + }; + + checkAdminExists(); + }, []); + return ( <>