并在ProtectedRoute中获取组件,如下所示:
我认为所有你需要修正的是为未认证的用户重定向到"/login"。而不是一个PUSH导航动作,它应该是一个REPLACE导航动作。这将有助于维护历史堆栈。
我认为所有你需要修正的是为未认证的用户重定向到"/login"。而不是一个PUSH导航动作,它应该是一个...
The pull request introduces a minor modification to theProtectedRoutecomponent's PropTypes declaration. The change specifically adjusts the type validation for thechildrenprop, transitioning from accepting any component type to requiring a single React element. This update refines the type checking mechani...