'use client'; import React, { useState, useEffect } from 'react'; import Link from 'next/link'; import { onAuthStateChanged, User } from 'firebase/auth'; import { firebaseAuth } from '../../../lib/firebase-client'; import { GroupRidesManagement } from '../../../components/group-rides/group-rides-management'; export default function GroupRidesManageRoute() { const [currentUser, setCurrentUser] = useState(firebaseAuth?.currentUser ?? null); const [authChecked, setAuthChecked] = useState(Boolean(firebaseAuth?.currentUser)); useEffect(() => { const unsubscribe = onAuthStateChanged(firebaseAuth, (user) => { setCurrentUser(user); setAuthChecked(true); }); return () => unsubscribe(); }, []); // If not logged in, render an access prompt directing them to sign in if (!currentUser && authChecked) { return (
lock

Authentication Required

The Group Rides Management Console allows riders to schedule, coordinate, and modify live squad pack runs. Please sign in to your rider account to proceed.

Sign In to Access Management Explore Feature Showcase
); } return ; }