This commit is contained in:
KS Jannette
2026-03-29 16:21:48 -04:00
parent 06d7cd4169
commit 0f770742ef
5 changed files with 133 additions and 80 deletions

View File

@@ -1,6 +1,5 @@
import { Routes, Route, Navigate } from "react-router-dom";
import { useAuth } from "./contexts/AuthContext";
import { useContext } from 'react'
import Navbar from "./components/Navbar";
import Login from "./pages/login/Login";
import Signup from "./pages/Signup";
@@ -9,11 +8,11 @@ import Addresses from "./pages/addresses/Addresses";
import Alerts from "./pages/alerts/Alerts";
import AlertHistory from "./pages/alertHistory/AlertHistory";
import Account from "./pages/user_account/Account";
import { AuthProvider } from "./ShopContext";
import useAuth from "./ShopContext";
export default function App() {
const { context } = useContext(ShopContext)
const { currentUser, isSubscribed, loading } = useAuth();
if (loading) return null;
if (!currentUser) {
return (