fix invite
This commit is contained in:
1 parent
3c71583324
commit
b88c46a6a1
9 files changed
+507
-184
No files matched your search
@@ -16,7 +16,8 @@ export const AuthVerifier = ({ children }: { children: ReactNode }) => {
|
||||
const location = useLocation();
|
||||
const isAuthRoute =
|
||||
["/login", "/register"].includes(location.pathname) ||
|
||||
location.pathname.startsWith("/recovery");
|
||||
location.pathname.startsWith("/recovery") ||
|
||||
location.pathname.startsWith("/register/");
|
||||
const isPublicRoute = location.pathname.startsWith("/status-pages/public");
|
||||
|
||||
const [isVerifying, setIsVerifying] = useState(true);
|
||||
|
||||
@@ -43,7 +43,7 @@ const RegisterInvite = () => {
|
||||
|
||||
if (!result) {
|
||||
dispatch(setAuthenticated(false));
|
||||
navigate("/login");
|
||||
// navigate("/login");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ const RegisterInvite = () => {
|
||||
|
||||
if (!user) {
|
||||
dispatch(setAuthenticated(false));
|
||||
navigate("/login");
|
||||
// navigate("/login");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@ const Router = () => {
|
||||
<Routes>
|
||||
<Route path="login" element={<AuthLogin />} />
|
||||
<Route path="register/:id" element={<AuthRegisterInvite />} />
|
||||
<Route path="register/invite/:token" element={<AuthRegisterInvite />} />
|
||||
<Route path="register" element={<AuthRegister />} />
|
||||
<Route path="status-pages/public/:url/" element={<StatusPublicPage />} />
|
||||
<Route path="recovery/:id" element={<ResetPage />} />
|
||||
|
||||
Reference in new issue
Block a user