Skip to content

Commit 3915d85

Browse files
authored
Merge pull request #591 from shnai0/onboarding
2 parents 809b7a9 + dc42fbf commit 3915d85

File tree

8 files changed

+544
-34
lines changed

8 files changed

+544
-34
lines changed

Diff for: .cursorignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.env

Diff for: components/welcome/dataroom-trial.tsx

+15-5
Original file line numberDiff line numberDiff line change
@@ -74,19 +74,27 @@ export default function DataroomTrial() {
7474
return;
7575
}
7676

77+
const { id: dataroomId } = await response.json(); // Assuming the API returns the created dataroom's ID
78+
79+
if (!dataroomId) {
80+
throw new Error("No dataroom ID returned from the server");
81+
}
82+
7783
analytics.capture("Dataroom Trial Created", {
7884
dataroomName: "Dataroom Demo Trial",
7985
industry,
8086
companySize,
87+
dataroomId,
8188
});
8289
toast.success("Dataroom successfully created! 🎉");
8390

8491
await mutate(`/api/teams/${teamInfo?.currentTeam?.id}/datarooms`);
85-
router.push("/datarooms");
92+
93+
// Instead of redirecting to "/datarooms", we'll navigate to the dataroom-upload page
94+
router.push(`/welcome?type=dataroom-upload&dataroomId=${dataroomId}`);
8695
} catch (error) {
87-
setLoading(false);
8896
toast.error("Error adding dataroom. Please try again.");
89-
return;
97+
console.error("Error creating dataroom:", error);
9098
} finally {
9199
setLoading(false);
92100
}
@@ -236,9 +244,11 @@ export default function DataroomTrial() {
236244
<button className="underline">Business</button>
237245
</UpgradePlanModal>{" "}
238246
plan. <br /> */}
239-
After the trial, upgrade to{" "}
247+
No credit card is required. After the trial, upgrade to{" "}
240248
<UpgradePlanModal clickedPlan="Business">
241-
<button className="underline">Papermark Business</button>
249+
<button className="underline">
250+
Papermark Business or Data Rooms
251+
</button>
242252
</UpgradePlanModal>{" "}
243253
to continue using data rooms.
244254
</div>

0 commit comments

Comments
 (0)