ask-and-trust - v1.1.0
    Preparing search index...

    Variable defaultConst

    default: React.FC<{ children: React.ReactNode }> = ...

    ProtectedRoute Component

    A Higher Order Component that protects routes requiring authentication. It checks if the user is authenticated and:

    • Shows a loader while checking authentication status
    • Shows the AuthRequired component if the user is not authenticated
    • Renders the protected content if the user is authenticated

    Component props

    The content to be protected

    The rendered protected route content or authentication required message