From b1f5e6f4b5fee40f440f9e1a947c3fe9bfbfcbad Mon Sep 17 00:00:00 2001 From: Sidney Alcantara Date: Wed, 1 Dec 2021 18:17:22 +1100 Subject: [PATCH] fix auth redirect not including url hash --- src/utils/PrivateRoute.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/PrivateRoute.tsx b/src/utils/PrivateRoute.tsx index f97fe756..0418aa3c 100644 --- a/src/utils/PrivateRoute.tsx +++ b/src/utils/PrivateRoute.tsx @@ -14,7 +14,9 @@ export default function PrivateRoute({ render, ...props }: IPrivateRouteProps) { if (!!currentUser) return ; const redirect = - (props.location?.pathname ?? "") + (props.location?.search ?? ""); + (props.location?.pathname ?? "") + + (props.location?.search ?? "") + + (props.location?.hash ?? ""); if (currentUser === null) return (