Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Onboarding update #591

Merged
merged 3 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cursorignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
20 changes: 15 additions & 5 deletions components/welcome/dataroom-trial.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,27 @@ export default function DataroomTrial() {
return;
}

const { id: dataroomId } = await response.json(); // Assuming the API returns the created dataroom's ID

if (!dataroomId) {
throw new Error("No dataroom ID returned from the server");
}

analytics.capture("Dataroom Trial Created", {
dataroomName: "Dataroom Demo Trial",
industry,
companySize,
dataroomId,
});
toast.success("Dataroom successfully created! 🎉");

await mutate(`/api/teams/${teamInfo?.currentTeam?.id}/datarooms`);
router.push("/datarooms");

// Instead of redirecting to "/datarooms", we'll navigate to the dataroom-upload page
router.push(`/welcome?type=dataroom-upload&dataroomId=${dataroomId}`);
} catch (error) {
setLoading(false);
toast.error("Error adding dataroom. Please try again.");
return;
console.error("Error creating dataroom:", error);
} finally {
setLoading(false);
}
Expand Down Expand Up @@ -236,9 +244,11 @@ export default function DataroomTrial() {
<button className="underline">Business</button>
</UpgradePlanModal>{" "}
plan. <br /> */}
After the trial, upgrade to{" "}
No credit card is required. After the trial, upgrade to{" "}
<UpgradePlanModal clickedPlan="Business">
<button className="underline">Papermark Business</button>
<button className="underline">
Papermark Business or Data Rooms
</button>
</UpgradePlanModal>{" "}
to continue using data rooms.
</div>
Expand Down
Loading