@@ -2,20 +2,15 @@ import {
2
2
AnthropicLogo ,
3
3
Button ,
4
4
DriveLogo ,
5
- DropdownMenu ,
6
- GithubLogo ,
7
5
GithubWhiteLogo ,
8
6
GoogleLogo ,
9
- LoginIcon ,
10
7
Logo ,
11
8
LogoHorizontalWhiteLogo ,
12
9
MicrosoftLogo ,
13
10
MistralLogo ,
14
11
MoreIcon ,
15
12
NotionLogo ,
16
13
OpenaiLogo ,
17
- PlayIcon ,
18
- RocketIcon ,
19
14
SlackLogo ,
20
15
} from "@dust-tt/sparkle" ;
21
16
import { GetServerSideProps , InferGetServerSidePropsType } from "next" ;
@@ -41,7 +36,10 @@ import {
41
36
42
37
const defaultFlexClasses = "flex flex-col gap-4" ;
43
38
44
- import { GoogleSignInButton } from "@app/components/Button" ;
39
+ import {
40
+ SignInDropDownButton ,
41
+ SignUpDropDownButton ,
42
+ } from "@app/components/Button" ;
45
43
import Particles from "@app/components/home/particles" ;
46
44
import ScrollingHeader from "@app/components/home/scrollingHeader" ;
47
45
import { PricePlans } from "@app/components/PlansTables" ;
@@ -133,68 +131,30 @@ export default function Home({
133
131
</P> */ }
134
132
</ div >
135
133
< div className = "flex-grow" />
136
- < div className = "flex items-center gap-2" >
137
- { ! ( router . query . signIn && router . query . signIn !== "github" ) && (
138
- < div className = "font-regular font-objektiv text-xs text-slate-400" >
139
- Sign in with { " " }
140
- < span
141
- className = "cursor-pointer font-bold hover:text-blue-400"
142
- onClick = { ( ) => {
143
- void signIn ( "github" , {
144
- callbackUrl : getCallbackUrl ( router . query ) ,
145
- } ) ;
146
- } }
147
- >
148
- GitHub
149
- </ span > { " " }
150
- or
151
- </ div >
152
- ) }
153
- < GoogleSignInButton
154
- onClick = { ( ) =>
134
+ < Button . List >
135
+ < SignUpDropDownButton
136
+ buttonClassname = "invisibleFirst hidden opacity-0 transition-all duration-500 ease-out lg:flex"
137
+ onClickGoogle = { ( ) =>
138
+ signIn ( "google" , {
139
+ callbackUrl : getCallbackUrl ( router . query ) ,
140
+ } )
141
+ }
142
+ />
143
+ < SignInDropDownButton
144
+ shouldDisplayGithub = {
145
+ ! ( router . query . signIn && router . query . signIn !== "github" )
146
+ }
147
+ onClickGithub = { ( ) => {
148
+ void signIn ( "github" , {
149
+ callbackUrl : getCallbackUrl ( router . query ) ,
150
+ } ) ;
151
+ } }
152
+ onClickGoogle = { ( ) =>
155
153
signIn ( "google" , {
156
154
callbackUrl : getCallbackUrl ( router . query ) ,
157
155
} )
158
156
}
159
- >
160
- < img src = "/static/google_white_32x32.png" className = "h-4 w-4" />
161
- < span className = "ml-2 mr-1" > Sign in with Google</ span >
162
- </ GoogleSignInButton >
163
- </ div >
164
- < Button . List >
165
- < Button
166
- variant = "primary"
167
- size = "sm"
168
- label = "Start with Dust"
169
- className = "invisibleFirst hidden opacity-0 transition-all duration-500 ease-out lg:block"
170
- icon = { RocketIcon }
171
157
/>
172
- < DropdownMenu >
173
- < DropdownMenu . Button >
174
- < Button
175
- variant = "tertiary"
176
- size = "sm"
177
- label = "Sign-in"
178
- icon = { LoginIcon }
179
- />
180
- </ DropdownMenu . Button >
181
- < DropdownMenu . Items origin = "topRight" width = { 240 } >
182
- < div className = "flex flex-col gap-2 p-4" >
183
- < Button
184
- variant = "tertiary"
185
- size = "md"
186
- label = "With Google"
187
- icon = { GoogleLogo }
188
- />
189
- < Button
190
- variant = "tertiary"
191
- size = "md"
192
- label = "With GitHub"
193
- icon = { GithubLogo }
194
- />
195
- </ div >
196
- </ DropdownMenu . Items >
197
- </ DropdownMenu >
198
158
</ Button . List >
199
159
</ div >
200
160
</ ScrollingHeader >
@@ -250,17 +210,13 @@ export default function Home({
250
210
is a competitive edge.
251
211
</ H3 >
252
212
< div className = "sm: flex w-full flex-wrap gap-4 sm:justify-start sm:gap-4 md:gap-6" >
253
- < Button
254
- variant = "primary"
255
- size = "md"
256
- label = "Start with Dust now"
257
- icon = { RocketIcon }
258
- />
259
- < Button
260
- variant = "secondary"
261
- size = "md"
262
- label = "Watch the video"
263
- icon = { PlayIcon }
213
+ < SignUpDropDownButton
214
+ buttonLabel = "Start with Dust Now"
215
+ onClickGoogle = { ( ) =>
216
+ signIn ( "google" , {
217
+ callbackUrl : getCallbackUrl ( router . query ) ,
218
+ } )
219
+ }
264
220
/>
265
221
</ div >
266
222
</ div >
0 commit comments