Skip to content

Commit fdfe0c7

Browse files
atrakhConvex, Inc.
authored andcommitted
dashboard: update window.location.href to new project url on project creation (#34388)
GitOrigin-RevId: 794ed3b009726af477b7b96d96dab82fb5dab1ea
1 parent 1dd78e9 commit fdfe0c7

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

npm-packages/dashboard/src/hooks/useCreateProjectModal.tsx

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { Button } from "dashboard-common/elements/Button";
44
import { Loading } from "dashboard-common/elements/Loading";
55
import { Spinner } from "dashboard-common/elements/Spinner";
66
import { ReactElement, useState } from "react";
7-
import { useRouter } from "next/router";
87
import { useFormik } from "formik";
98
import * as Yup from "yup";
109
import { Team } from "generatedApi";
@@ -59,7 +58,6 @@ const CreateProjectSchema = Yup.object().shape({
5958
});
6059

6160
function CreateProjectForm({ onClose, team }: { onClose(): void; team: Team }) {
62-
const router = useRouter();
6361
const createProject = useCreateProject(team.id);
6462
const formState = useFormik({
6563
initialValues: {
@@ -73,14 +71,7 @@ function CreateProjectForm({ onClose, team }: { onClose(): void; team: Team }) {
7371
deploymentType: "dev",
7472
});
7573
const projectUrl = `/t/${team.slug}/${project.projectSlug}/${project.deploymentName}/data`;
76-
await router.push(
77-
{
78-
pathname: projectUrl,
79-
},
80-
{
81-
pathname: projectUrl,
82-
},
83-
);
74+
window.location.href = projectUrl;
8475
onClose();
8576
},
8677
});

0 commit comments

Comments
 (0)