Skip to content

Commit ba426a5

Browse files
committed
fix: new demo
1 parent 8d6aa2a commit ba426a5

File tree

2 files changed

+89
-53
lines changed

2 files changed

+89
-53
lines changed

web/src/app/page.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,9 @@ const Home = () => {
3636
Use natural language to edit your codebase faster and run commands
3737
from your terminal faster.
3838
</p>
39-
{/*Alternatively, "Modify multiple files at once with natural language in your terminal"*/}
4039
<div className="hidden md:block">
4140
<p>Use natural language to edit your codebase faster and</p>
4241
<p>run commands from your terminal faster.</p>
43-
{/*Alternatively, "Modify multiple files at once with natural language in your terminal"*/}
4442
</div>
4543
</div>
4644
<section className="relative z-10">
@@ -60,12 +58,12 @@ const Home = () => {
6058

6159
<section className="py-10 px-4 relative z-10 space-y-8">
6260
<h2 className="text-3xl md:text-4xl font-bold text-center">
63-
Watch the Demo
61+
Watch a Demo
6462
</h2>
6563
<div className="max-w-3xl mx-auto">
6664
<div className="aspect-w-16 aspect-h-full h-96">
6765
<iframe
68-
src="https://www.youtube.com/embed/eezrK8JPgxU"
66+
src="https://www.youtube.com/embed/dQ0NOMsu0dA"
6967
title="Codebuff Demo"
7068
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
7169
allowFullScreen

web/src/app/referrals/[code]/page.tsx

Lines changed: 87 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
'use client'
22

33
import { useSession } from 'next-auth/react'
4-
import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card'
4+
import {
5+
Card,
6+
CardContent,
7+
CardDescription,
8+
CardHeader,
9+
CardTitle,
10+
} from '@/components/ui/card'
511
import { Skeleton } from '@/components/ui/skeleton'
612
import { useEffect, useState } from 'react'
713
import { Input } from '@/components/ui/input'
@@ -72,60 +78,92 @@ export default function RedeemPage({ params }: { params: { code: string } }) {
7278
}
7379

7480
return (
75-
<Card className="bg-violet-100 dark:bg-violet-900">
76-
<CardHeader>
77-
<CardTitle className="flex">
78-
<GiftIcon className="mr-2" />
79-
{data?.status.reason ? data.status.reason : "You've got credits!"}
80-
</CardTitle>
81-
</CardHeader>
82-
83-
<CardContent>
84-
<b>Hey {session?.user?.name} 👋</b>
85-
{data?.status.reason && data.status.details?.msg ? (
86-
<p className="text-red-600 mt-2">{data.status.details.msg}</p>
87-
) : (
88-
<p>
89-
Your friend {data?.referrerName} just scored you some sweet sweet
90-
credits.
91-
</p>
92-
)}
93-
</CardContent>
81+
<div className="flex flex-col space-y-6">
82+
<Card className="bg-violet-100 dark:bg-violet-900">
83+
<CardHeader>
84+
<CardTitle className="flex">
85+
<GiftIcon className="mr-2" />
86+
{data?.status.reason ? data.status.reason : "You've got credits!"}
87+
</CardTitle>
88+
</CardHeader>
9489

95-
<div className="flex flex-col space-y-2">
9690
<CardContent>
97-
<p className="my-4">
98-
{data?.status.reason
99-
? `Fear not, you can still get started with Manicode! Here's how:`
100-
: 'To redeem them, follow these steps:'}
101-
</p>
102-
<ol className="list-decimal list-inside space-y-6">
103-
<li>
104-
Install Codebuff globally:
105-
<InputWithCopyButton text={'npm i -g codebuff'} />
106-
</li>
107-
<li>
108-
Run Codebuff in Terminal
109-
<InputWithCopyButton text={'codebuff'} />
110-
</li>
111-
{!data?.status.reason && (
91+
<b>Hey {session?.user?.name} 👋</b>
92+
{data?.status.reason && data.status.details?.msg ? (
93+
<p className="text-red-600 mt-2">{data.status.details.msg}</p>
94+
) : (
95+
<p>
96+
Your friend {data?.referrerName} just scored you some sweet sweet
97+
credits.
98+
</p>
99+
)}
100+
</CardContent>
101+
102+
<div className="flex flex-col space-y-2">
103+
<CardContent>
104+
<p className="my-4">
105+
{data?.status.reason
106+
? `Fear not, you can still get started with Manicode! Here's how:`
107+
: 'To redeem them, follow these steps:'}
108+
</p>
109+
<ol className="list-decimal list-inside space-y-6">
112110
<li>
113-
Paste this referral code in the CLI.
114-
<InputWithCopyButton text={params.code} />
111+
Install Codebuff globally:
112+
<InputWithCopyButton text={'npm i -g codebuff'} />
115113
</li>
116-
)}
117-
</ol>
118-
</CardContent>
119-
</div>
114+
<li>
115+
Run Codebuff in Terminal
116+
<InputWithCopyButton text={'codebuff'} />
117+
</li>
118+
{!data?.status.reason && (
119+
<li>
120+
Paste this referral code in the CLI.
121+
<InputWithCopyButton text={params.code} />
122+
</li>
123+
)}
124+
</ol>
125+
</CardContent>
126+
</div>
120127

121-
{data?.isSameUser && (
128+
{data?.isSameUser && (
129+
<CardContent>
130+
<p className="font-bold text-red-600 mt-4">
131+
Just FYI, this is your own referral code. (Others won&apos;t see
132+
this message).
133+
</p>
134+
</CardContent>
135+
)}
136+
</Card>
137+
<Card className="bg-violet-100 dark:bg-blue-900">
138+
<CardHeader>
139+
<CardTitle className="flex">
140+
<h2 className="text-2xl font-bold">What is Codebuff?</h2>
141+
</CardTitle>
142+
</CardHeader>
122143
<CardContent>
123-
<p className="font-bold text-red-600 mt-4">
124-
Just FYI, this is your own referral code. (Others won&apos;t see
125-
this message).
126-
</p>
144+
<CardDescription>
145+
<div className="flex justify-between items-center">
146+
<p>
147+
Codebuff is a code-editing tool that uses natural language to
148+
edit your codebase. It&apos;s a coding assistant that
149+
understands your code structure and dependencies.
150+
</p>
151+
</div>
152+
</CardDescription>
153+
<div className="max-w-3xl mx-auto mt-4">
154+
<h3>Watch a demo</h3>
155+
<div className="aspect-w-16 aspect-h-full h-96">
156+
<iframe
157+
src="https://www.youtube.com/embed/dQ0NOMsu0dA"
158+
title="Codebuff Demo"
159+
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
160+
allowFullScreen
161+
className="h-full w-full rounded-lg shadow-lg"
162+
></iframe>
163+
</div>
164+
</div>
127165
</CardContent>
128-
)}
129-
</Card>
166+
</Card>
167+
</div>
130168
)
131169
}

0 commit comments

Comments
 (0)