mirror of
https://github.com/marcogll/AnchorOS.git
synced 2026-03-15 18:24:31 +00:00
feat: Add kiosk management, artist selection, and schedule management
- Add KiosksManagement component with full CRUD for kiosks - Add ScheduleManagement for staff schedules with break reminders - Update booking flow to allow artist selection by customers - Add staff_services API for assigning services to artists - Update staff management UI with service assignment dialog - Add auto-break reminder when schedule >= 8 hours - Update availability API to filter artists by service - Add kiosk management to Aperture dashboard - Clean up ralphy artifacts and logs
This commit is contained in:
@@ -5,8 +5,15 @@ import { useRouter, usePathname } from 'next/navigation'
|
||||
import { useAuth } from '@/lib/auth/context'
|
||||
|
||||
/**
|
||||
* AuthGuard component that shows loading state while authentication is being determined
|
||||
* Redirect logic is now handled by AuthProvider to avoid conflicts
|
||||
* @description Authentication guard component that protects routes requiring login
|
||||
* @param {Object} props - Component props
|
||||
* @param {React.ReactNode} props.children - Child components to render when authenticated
|
||||
* @returns {JSX.Element} Loading state while auth is determined, or children when authenticated
|
||||
* @audit BUSINESS RULE: AuthGuard is a client-side guard for protected routes
|
||||
* @audit SECURITY: Prevents rendering protected content until authentication verified
|
||||
* @audit Validate: Loading state shown while auth provider determines user session
|
||||
* @audit PERFORMANCE: No API calls - relies on AuthProvider's cached session state
|
||||
* @audit Note: Actual redirect logic handled by AuthProvider to avoid conflicts
|
||||
*/
|
||||
export function AuthGuard({ children }: { children: React.ReactNode }) {
|
||||
const { loading: authLoading } = useAuth()
|
||||
|
||||
Reference in New Issue
Block a user