mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 20:28:31 +00:00
Fixed the bug with redirect during signup invite
This commit is contained in:
@@ -5,13 +5,13 @@ import { useRouter } from 'next/router';
|
||||
import Button from '@app/components/basic/buttons/Button';
|
||||
import { getTranslatedServerSideProps } from '@app/components/utilities/withTranslateProps';
|
||||
|
||||
import getWorkspaces from './api/workspace/getWorkspaces';
|
||||
import getOrganizationUserProjects from './api/organization/GetOrgUserProjects';
|
||||
|
||||
export default function NoProjects() {
|
||||
const router = useRouter();
|
||||
|
||||
const redirectUser = async () => {
|
||||
const workspaces = await getWorkspaces();
|
||||
const workspaces = await getOrganizationUserProjects({ orgId: String(localStorage.getItem("orgData.id")) });
|
||||
if (workspaces.length > 0) {
|
||||
router.push(`/dashboard/${workspaces[0]._id}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user