Skip to content

Naming Inconsistency: "OnRedirecting" vs. "onRedirecting" #1225

@pengqun

Description

@pengqun

In the project README, under the section "Protect a route," the following example code is provided:

export default withAuthenticationRequired(PrivateRoute, {
  onRedirecting: () => (<div>Redirecting to the login page...</div>)
});

However, this code does not compile because the onRedirecting prop is named "OnRedirecting" (with a capital "O") in the source code (src/withAuthenticationRequired.tsx):

export interface WithAuthenticationRequiredProps {
    /**
     * Show a message when redirected to the signin page.
     */
    OnRedirecting?: () => JSX.Element;

    /**
     * Allows executing logic before the user is redirected to the signin page.
     */
    onBeforeSignin?: () => Promise<void> | void;

    /**
     * Pass additional signin redirect arguments.
     */
    signinRedirectArgs?: SigninRedirectArgs;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions