@@ -74,19 +74,27 @@ export default function DataroomTrial() {
74
74
return ;
75
75
}
76
76
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
+
77
83
analytics . capture ( "Dataroom Trial Created" , {
78
84
dataroomName : "Dataroom Demo Trial" ,
79
85
industry,
80
86
companySize,
87
+ dataroomId,
81
88
} ) ;
82
89
toast . success ( "Dataroom successfully created! 🎉" ) ;
83
90
84
91
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 } ` ) ;
86
95
} catch ( error ) {
87
- setLoading ( false ) ;
88
96
toast . error ( "Error adding dataroom. Please try again." ) ;
89
- return ;
97
+ console . error ( "Error creating dataroom:" , error ) ;
90
98
} finally {
91
99
setLoading ( false ) ;
92
100
}
@@ -236,9 +244,11 @@ export default function DataroomTrial() {
236
244
<button className="underline">Business</button>
237
245
</UpgradePlanModal>{" "}
238
246
plan. <br /> */ }
239
- After the trial, upgrade to{ " " }
247
+ No credit card is required. After the trial, upgrade to{ " " }
240
248
< UpgradePlanModal clickedPlan = "Business" >
241
- < button className = "underline" > Papermark Business</ button >
249
+ < button className = "underline" >
250
+ Papermark Business or Data Rooms
251
+ </ button >
242
252
</ UpgradePlanModal > { " " }
243
253
to continue using data rooms.
244
254
</ div >
0 commit comments