@@ -34,12 +34,21 @@ export function SessionScoreCard({
3434 const isAccountResult = report . source === "account" ;
3535 const hasLiveRank =
3636 ! rankLocked && report . currentRank > 0 && report . totalCandidates > 0 ;
37+
38+ const accountPracticePath = `/interview?mode=account&autostart=1&role=${ encodeURIComponent (
39+ report . role || "Interview"
40+ ) } &experience=${ encodeURIComponent ( "Fresher" ) } &company=${ encodeURIComponent (
41+ report . companyType || "General"
42+ ) } `;
43+
44+ const encodedAccountPracticePath = encodeURIComponent ( accountPracticePath ) ;
45+
3746 const practiceHref = isAccountResult
38- ? "/interview?mode=account"
39- : "/login?next=%2Finterview%3Fmode%3Daccount" ;
47+ ? accountPracticePath
48+ : `/login?next=${ encodedAccountPracticePath } ` ;
49+
4050 const leaderboardHref =
4151 isAccountResult || hasLiveRank ? "/dashboard/leaderboard" : "/leaderboard" ;
42- const accountPracticePath = "%2Finterview%3Fmode%3Daccount" ;
4352
4453 return (
4554 < div className = "rounded-3xl overflow-hidden border border-[rgba(0,132,255,0.15)] shadow-[0_32px_80px_rgba(0,0,0,0.08)] bg-white" >
@@ -52,9 +61,11 @@ export function SessionScoreCard({
5261 < p className = "font-inter text-[13px] text-white/60 mb-1.5" >
5362 { report . role } · { report . companyType }
5463 </ p >
64+
5565 < h1 className = "font-fustat font-extrabold text-[22px] text-white mb-5" >
5666 { report . name }
5767 </ h1 >
68+
5869 < div className = "flex items-center gap-5 flex-wrap" >
5970 < div
6071 className = "relative w-[88px] h-[88px] rounded-full flex items-center justify-center shrink-0"
@@ -70,6 +81,7 @@ export function SessionScoreCard({
7081 < span className = "font-inter text-[10px] text-white/50" > /100</ span >
7182 </ div >
7283 </ div >
84+
7385 < div >
7486 { rankLocked ? (
7587 < div className = "select-none" >
@@ -81,10 +93,12 @@ export function SessionScoreCard({
8193 < div className = "absolute left-4 top-1/2 h-3 w-24 -translate-y-1/2 rounded-full bg-white/35 blur-[3px]" />
8294 < div className = "absolute right-4 top-1/2 h-3 w-9 -translate-y-1/2 rounded-full bg-[#7DFFD9]/45 blur-[3px]" />
8395 </ div >
96+
8497 < p className = "flex items-center gap-2 font-inter text-[13px] font-bold text-white/78" >
8598 < LockKeyhole size = { 14 } />
8699 Sign in to continue
87100 </ p >
101+
88102 < p className = "mt-2 max-w-[260px] font-inter text-[12px] leading-5 text-white/58" >
89103 Create an account or sign in to save interviews and enter the live board.
90104 </ p >
@@ -107,6 +121,7 @@ export function SessionScoreCard({
107121 </ div >
108122 </ div >
109123 </ div >
124+
110125 < div className = "px-7 py-6 space-y-4" >
111126 { report . dimensions . map ( ( d ) => (
112127 < div key = { d . label } >
@@ -124,6 +139,7 @@ export function SessionScoreCard({
124139 ) }
125140 </ div >
126141 ) ) }
142+
127143 < div className = "flex flex-col sm:flex-row gap-2.5 pt-2" >
128144 { rankLocked ? (
129145 < button
@@ -141,17 +157,23 @@ export function SessionScoreCard({
141157 Practice Again
142158 </ Link >
143159 ) }
160+
144161 < Link
145- href = { rankLocked ? "/login?next=%2Fdashboard%2Fleaderboard" : leaderboardHref }
162+ href = {
163+ rankLocked
164+ ? "/login?next=%2Fdashboard%2Fleaderboard"
165+ : leaderboardHref
166+ }
146167 target = { rankLocked ? "_blank" : undefined }
147168 rel = { rankLocked ? "noopener noreferrer" : undefined }
148169 className = "flex-1 text-center py-2.5 rounded-[10px] border border-[rgba(0,0,0,0.08)] font-inter font-semibold text-[13px] hover:scale-[1.02] transition-transform cursor-pointer"
149170 >
150171 { rankLocked ? "Sign in to unlock" : "View Leaderboard" }
151172 </ Link >
173+
152174 { rankLocked && (
153175 < Link
154- href = " /login?next=%2Finterview%3Fmode%3Daccount & mode = signup "
176+ href = { ` /login?next=${ encodedAccountPracticePath } &mode=signup` }
155177 target = "_blank"
156178 rel = "noopener noreferrer"
157179 className = "flex-1 text-center py-2.5 rounded-[10px] border border-[rgba(0,132,255,0.18)] bg-[rgba(0,132,255,0.06)] font-inter font-semibold text-[13px] text-blue hover:scale-[1.02] transition-transform cursor-pointer"
@@ -161,6 +183,7 @@ export function SessionScoreCard({
161183 ) }
162184 </ div >
163185 </ div >
186+
164187 { practiceGateOpen && (
165188 < div
166189 className = "fixed inset-0 z-[500] flex items-center justify-center bg-[#07111f]/55 px-4 backdrop-blur-sm"
@@ -171,6 +194,7 @@ export function SessionScoreCard({
171194 < div className = "relative w-full max-w-[520px] overflow-hidden rounded-[28px] border border-[rgba(0,132,255,0.18)] bg-white shadow-[0_34px_90px_rgba(0,40,90,0.24)]" >
172195 < div className = "absolute right-[-80px] top-[-90px] h-60 w-60 rounded-full bg-[#0084ff]/15 blur-[55px]" />
173196 < div className = "absolute bottom-[-120px] left-[-80px] h-64 w-64 rounded-full bg-[#7dffd9]/12 blur-[65px]" />
197+
174198 < button
175199 type = "button"
176200 onClick = { ( ) => setPracticeGateOpen ( false ) }
@@ -179,15 +203,18 @@ export function SessionScoreCard({
179203 >
180204 < X size = { 18 } />
181205 </ button >
206+
182207 < div className = "relative z-10 p-7 sm:p-8" >
183208 < div className = "mb-6 flex items-center gap-4" >
184209 < div className = "flex h-14 w-14 items-center justify-center rounded-2xl bg-[#EAF5FF] shadow-[inset_0_0_0_1px_rgba(0,132,255,0.14)]" >
185210 < LockKeyhole size = { 24 } className = "text-blue" strokeWidth = { 2.1 } />
186211 </ div >
212+
187213 < div >
188214 < p className = "font-inter text-[11px] font-extrabold uppercase tracking-[0.22em] text-blue" >
189215 Account required
190216 </ p >
217+
191218 < h2
192219 id = "practice-gate-title"
193220 className = "mt-1 font-fustat text-2xl font-extrabold tracking-[-0.04em] text-text"
@@ -196,23 +223,26 @@ export function SessionScoreCard({
196223 </ h2 >
197224 </ div >
198225 </ div >
226+
199227 < p className = "font-inter text-[15px] leading-7 text-muted" >
200228 Interviews now run inside your PrepPeer account. Sign in or
201229 create an account to start a session, save every result, and track
202230 your rank on the live board.
203231 </ p >
232+
204233 < div className = "mt-7 grid gap-3 sm:grid-cols-2" >
205234 < Link
206- href = { `/login?next=${ accountPracticePath } ` }
235+ href = { `/login?next=${ encodedAccountPracticePath } ` }
207236 target = "_blank"
208237 rel = "noopener noreferrer"
209238 className = "group inline-flex items-center justify-center gap-2 rounded-2xl bg-blue px-5 py-3 font-inter text-sm font-extrabold text-white shadow-[0_18px_38px_rgba(0,132,255,0.24)] transition hover:-translate-y-0.5 hover:shadow-[0_24px_48px_rgba(0,132,255,0.32)]"
210239 >
211240 Sign in to continue
212241 < ArrowRight size = { 16 } className = "transition group-hover:translate-x-0.5" />
213242 </ Link >
243+
214244 < Link
215- href = { `/login?next=${ accountPracticePath } &mode=signup` }
245+ href = { `/login?next=${ encodedAccountPracticePath } &mode=signup` }
216246 target = "_blank"
217247 rel = "noopener noreferrer"
218248 className = "group inline-flex items-center justify-center gap-2 rounded-2xl border border-[rgba(0,132,255,0.18)] bg-[#F2F8FF] px-5 py-3 font-inter text-sm font-extrabold text-blue transition hover:-translate-y-0.5 hover:border-blue/35 hover:bg-white"
0 commit comments