Skip to content

Commit 8a65edc

Browse files
committed
Professionalize our login flow
1 parent 4c52022 commit 8a65edc

File tree

1 file changed

+16
-31
lines changed

1 file changed

+16
-31
lines changed

web/src/app/onboard/page.tsx

Lines changed: 16 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { db } from '@codebuff/internal/db'
66
import * as schema from '@codebuff/internal/db/schema'
77
import { env } from '@codebuff/internal/env'
88
import { and, eq, gt } from 'drizzle-orm'
9-
import Image from 'next/image'
109
import { redirect } from 'next/navigation'
1110
import { getServerSession } from 'next-auth'
1211

@@ -52,17 +51,14 @@ const Onboard = async ({ searchParams = {} }: PageProps) => {
5251
title: 'Welcome to Codebuff!',
5352
description: hasReferralInUrl
5453
? "Once you've installed Codebuff, you can close this window."
55-
: 'You can close this window.',
54+
: '',
5655
content: (
57-
<div className="flex flex-col space-y-2">
58-
<Image
59-
src="/auth-success.png"
60-
alt="Successful authentication"
61-
width={600}
62-
height={600}
63-
/>
56+
<div className="flex flex-col space-y-4 text-center">
57+
<p className="text-lg">
58+
You're all set! Head back to your terminal to continue.
59+
</p>
6460
{hasReferralInUrl && (
65-
<p className="text-center text-muted-foreground">
61+
<p className="text-muted-foreground">
6662
Don't forget to enter your referral code in the CLI to claim your
6763
bonus credits!
6864
</p>
@@ -208,34 +204,23 @@ const Onboard = async ({ searchParams = {} }: PageProps) => {
208204
return !!session.length
209205
})
210206

211-
// No longer auto-redeem referral codes - users must enter them in CLI
212-
let referralMessage = <></>
213-
if (referralCode) {
214-
referralMessage = (
215-
<p className="text-center text-muted-foreground">
216-
Don't forget to enter your referral code in the CLI to claim your bonus
217-
credits!
218-
</p>
219-
)
220-
}
221-
222207
// Render the result for CLI flow
223208
if (didInsert) {
224209
const isReferralUser = !!referralCode
225210
const successCard = CardWithBeams({
226-
title: 'Nicely done!',
211+
title: 'Login successful!',
227212
description: isReferralUser
228213
? 'Follow the steps above to install Codebuff, then you can close this window.'
229-
: 'Feel free to close this window and head back to your terminal.',
214+
: '',
230215
content: (
231-
<div className="flex flex-col space-y-2">
232-
<Image
233-
src="/auth-success.png"
234-
alt="Successful authentication"
235-
width={600}
236-
height={600}
237-
/>
238-
{referralMessage}
216+
<div className="flex flex-col space-y-4 text-center">
217+
<p className="text-lg">Return to your terminal to continue.</p>
218+
{referralCode && (
219+
<p className="text-muted-foreground">
220+
Don't forget to enter your referral code in the CLI to claim your
221+
bonus credits!
222+
</p>
223+
)}
239224
</div>
240225
),
241226
})

0 commit comments

Comments
 (0)