Merge pull request #370 from Neeraj138/login-after-delete-all-projects

Fix: Unable to login after deleting all projects
This commit is contained in:
mv-turtle
2023-03-04 21:22:54 -08:00
committed by GitHub
2 changed files with 2 additions and 3 deletions

View File

@@ -219,8 +219,7 @@ export default function Dashboard() {
(async () => {
if (router.isReady && workspaceId === 'undefined') {
router.push('/noprojects');
}
try {
} else try {
const { push, query } = router
const tempNumSnapshots = await getProjectSercetSnapshotsCount({
workspaceId

View File

@@ -33,7 +33,7 @@ export default function Login() {
let userWorkspace;
try {
const userWorkspaces = await getWorkspaces();
userWorkspace = userWorkspaces[0]._id;
userWorkspace = userWorkspaces[0] && userWorkspaces[0]._id;
router.push(`/dashboard/${userWorkspace}`);
} catch (error) {
console.log('Error - Not logged in yet');