fix: home
This commit is contained in:
@@ -6,7 +6,6 @@ import type {
|
||||
LoginCredentials,
|
||||
RegisterData,
|
||||
OrganizationCreateData,
|
||||
OrganizationMember,
|
||||
} from "../types/auth.types";
|
||||
|
||||
export const useAuth = () => {
|
||||
@@ -24,7 +23,7 @@ export const useAuth = () => {
|
||||
const orgs = await request(() => authService.getOrganizations());
|
||||
if (orgs && orgs.length > 0) {
|
||||
authService.saveOrganization(orgs[0]);
|
||||
navigate("/home");
|
||||
navigate("/");
|
||||
} else {
|
||||
navigate("/create-organization");
|
||||
}
|
||||
@@ -58,7 +57,7 @@ export const useAuth = () => {
|
||||
|
||||
if (result) {
|
||||
authService.saveOrganization(result);
|
||||
navigate("/home");
|
||||
navigate("/");
|
||||
} else if (error) {
|
||||
setAuthError(error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user