fix auth redirect not including url hash

This commit is contained in:
Sidney Alcantara
2021-12-01 18:17:22 +11:00
parent 4caafa0bc2
commit b1f5e6f4b5

View File

@@ -14,7 +14,9 @@ export default function PrivateRoute({ render, ...props }: IPrivateRouteProps) {
if (!!currentUser) return <Route {...props} render={render} />;
const redirect =
(props.location?.pathname ?? "") + (props.location?.search ?? "");
(props.location?.pathname ?? "") +
(props.location?.search ?? "") +
(props.location?.hash ?? "");
if (currentUser === null)
return (