This commit is contained in:
KS Jannette
2026-03-28 11:55:51 -04:00
parent d9c3bd1db5
commit b0572451d3
18 changed files with 293 additions and 32 deletions

View File

@@ -10,7 +10,7 @@ import AlertHistory from "./pages/alertHistory/AlertHistory";
import Account from "./pages/user_account/Account";
export default function App() {
const { currentUser } = useAuth();
const { currentUser, isSubscribed } = useAuth();
if (!currentUser) {
return (
@@ -23,6 +23,16 @@ export default function App() {
);
}
if (!isSubscribed) {
return (
<Routes>
<Route path="/subscribe" element={<Subscribe />} />
<Route path="/account" element={<><Navbar /><Account /></>} />
<Route path="*" element={<Navigate to="/subscribe" />} />
</Routes>
);
}
return (
<div>
<Navbar />