Skip to content

Commit

Permalink
Fixed the bug with redirect during signup invite
Browse files Browse the repository at this point in the history
  • Loading branch information
vmatsiiako committed Jan 18, 2023
1 parent b7115d8 commit 6567c3b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 33 deletions.
30 changes: 0 additions & 30 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
"react-beautiful-dnd": "^13.1.1",
"react-code-input": "^3.10.1",
"react-dom": "^17.0.2",
"react-github-btn": "^1.4.0",
"react-grid-layout": "^1.3.4",
"react-i18next": "^12.1.1",
"react-mailchimp-subscribe": "^2.1.3",
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/noprojects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
Expand Down

0 comments on commit 6567c3b

Please sign in to comment.