We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53f26b3 commit 5b9dc2eCopy full SHA for 5b9dc2e
site/src/components/RequireAuth/RequireAuth.tsx
@@ -10,7 +10,9 @@ export const RequireAuth: FC = () => {
10
const [authState] = useAuth()
11
const location = useLocation()
12
const isHomePage = location.pathname === "/"
13
- const navigateTo = isHomePage ? "/login" : embedRedirect(location.pathname)
+ const navigateTo = isHomePage
14
+ ? "/login"
15
+ : embedRedirect(`${location.pathname}${location.search}`)
16
17
if (authState.matches("signedOut")) {
18
return <Navigate to={navigateTo} state={{ isRedirect: !isHomePage }} />
0 commit comments