1- import { useState , useEffect } from "react" ;
2- import { useRouter } from "next/router" ;
3- import { H2 , H3 , P } from "../../ui/typography" ;
4- import { useOrg } from "../../layout/org/organizationContext" ;
5- import {
6- OnboardingState ,
7- useOrgOnboarding ,
8- } from "../../../services/hooks/useOrgOnboarding" ;
9- import { QuickstartStepCard } from "../../onboarding/QuickstartStep" ;
10- import IntegrationGuide from "./integrationGuide" ;
11- import {
12- DropdownMenu ,
13- DropdownMenuTrigger ,
14- DropdownMenuContent ,
15- DropdownMenuItem ,
16- } from "../../ui/dropdown-menu" ;
17- import { Button } from "../../ui/button" ;
1+ import useNotification from "@/components/shared/notification/useNotification" ;
2+ import { useKeys } from "@/components/templates/keys/useKeys" ;
3+ import { getJawnClient } from "@/lib/clients/jawn" ;
4+ import { useLocalStorage } from "@/services/hooks/localStorage" ;
5+ import { useCredits } from "@/services/hooks/useCredits" ;
186import {
19- ChevronDown ,
7+ ArrowRight ,
8+ BarChart ,
209 BookOpen ,
21- MessageSquare ,
22- Mail ,
23- Copy ,
24- Loader ,
25- Check ,
2610 Bot ,
27- MoveUpRight ,
11+ Check ,
12+ ChevronDown ,
13+ Copy ,
2814 CreditCard ,
29- DollarSign ,
30- Zap ,
31- Key ,
32- Send ,
3315 ExternalLink ,
34- BarChart ,
16+ Key ,
3517 ListTreeIcon ,
18+ Loader ,
19+ Mail ,
20+ MessageSquare ,
21+ MoveUpRight ,
22+ Send ,
3623 UserPlus ,
37- ArrowRight ,
24+ Zap ,
3825} from "lucide-react" ;
3926import Link from "next/link" ;
40- import { useKeys } from "@/components/templates/keys/useKeys" ;
41- import { useLocalStorage } from "@/services/hooks/localStorage" ;
42- import useNotification from "@/components/shared/notification/useNotification" ;
27+ import { useRouter } from "next/router" ;
28+ import { useEffect , useState } from "react" ;
29+ import { useOrgOnboarding } from "../../../services/hooks/useOrgOnboarding" ;
30+ import { useOrg } from "../../layout/org/organizationContext" ;
31+ import { QuickstartStepCard } from "../../onboarding/QuickstartStep" ;
32+ import { Button } from "../../ui/button" ;
33+ import {
34+ DropdownMenu ,
35+ DropdownMenuContent ,
36+ DropdownMenuItem ,
37+ DropdownMenuTrigger ,
38+ } from "../../ui/dropdown-menu" ;
4339import {
4440 Sheet ,
4541 SheetContent ,
4642 SheetDescription ,
4743 SheetHeader ,
4844 SheetTitle ,
4945} from "../../ui/sheet" ;
50- import { ProviderKeySettings } from "../settings/providerKeySettings" ;
51- import PaymentModal from "../settings/PaymentModal" ;
52- import HelixIntegrationDialog from "./HelixIntegrationDialog" ;
53- import { useHeliconeAgent } from "../agent/HeliconeAgentContext" ;
54- import { useCredits } from "@/services/hooks/useCredits" ;
55- import { getJawnClient } from "@/lib/clients/jawn" ;
5646import {
5747 Tooltip ,
5848 TooltipContent ,
5949 TooltipProvider ,
6050 TooltipTrigger ,
6151} from "../../ui/tooltip" ;
52+ import { H2 , H3 , P } from "../../ui/typography" ;
53+ import { useHeliconeAgent } from "../agent/HeliconeAgentContext" ;
54+ import PaymentModal from "../settings/PaymentModal" ;
55+ import { ProviderKeySettings } from "../settings/providerKeySettings" ;
56+ import HelixIntegrationDialog from "./HelixIntegrationDialog" ;
57+ import IntegrationGuide from "./integrationGuide" ;
6258
6359const QuickstartPage = ( ) => {
64- const router = useRouter ( ) ;
6560 const org = useOrg ( ) ;
6661 const { setNotification } = useNotification ( ) ;
6762 const { addKey } = useKeys ( ) ;
@@ -95,24 +90,11 @@ const QuickstartPage = () => {
9590 } = useHeliconeAgent ( ) ;
9691
9792 useEffect ( ( ) => {
98- if ( org ?. currentOrg ?. onboarding_status ) {
99- const hasCompletedQuickstart = (
100- org ?. currentOrg ?. onboarding_status as unknown as OnboardingState
101- ) . hasCompletedQuickstart ;
102- if ( hasCompletedQuickstart ) {
103- router . push ( "/dashboard" ) ;
104- }
105- }
106-
10793 if ( hasKeys === false ) {
10894 setQuickstartKey ( undefined ) ;
10995 }
11096 } , [ hasKeys ] ) ;
11197
112- useEffect ( ( ) => {
113- setAgentChatOpen ( true ) ;
114- } , [ ] ) ;
115-
11698 useEffect ( ( ) => {
11799 setToolHandler ( "quickstart-open-integration-guide" , async ( ) => {
118100 setIsHelixDialogOpen ( true ) ;
@@ -190,7 +172,8 @@ const QuickstartPage = () => {
190172 setNotification ( result . data ?. error ?? "Request failed" , "error" ) ;
191173 }
192174 } catch ( error ) {
193- const errorMessage = error instanceof Error ? error . message : "Unknown error" ;
175+ const errorMessage =
176+ error instanceof Error ? error . message : "Unknown error" ;
194177 setTestError ( errorMessage ) ;
195178 setNotification ( errorMessage , "error" ) ;
196179 } finally {
@@ -247,7 +230,7 @@ const QuickstartPage = () => {
247230 href = "/credits"
248231 target = "_blank"
249232 rel = "noopener noreferrer"
250- className = "flex items-center gap-1 hover:text-foreground transition-colors "
233+ className = "flex items-center gap-1 transition-colors hover:text-foreground"
251234 onClick = { ( e ) => e . stopPropagation ( ) }
252235 >
253236 < span > Add credits</ span >
@@ -257,7 +240,7 @@ const QuickstartPage = () => {
257240 href = "/settings/providers"
258241 target = "_blank"
259242 rel = "noopener noreferrer"
260- className = "flex items-center gap-1 hover:text-foreground transition-colors "
243+ className = "flex items-center gap-1 transition-colors hover:text-foreground"
261244 onClick = { ( e ) => e . stopPropagation ( ) }
262245 >
263246 < span > Configure keys</ span >
@@ -283,7 +266,10 @@ const QuickstartPage = () => {
283266 >
284267 { isTestLoading ? (
285268 < >
286- < Loader size = { 14 } className = "mr-1 animate-spin" />
269+ < Loader
270+ size = { 14 }
271+ className = "mr-1 animate-spin"
272+ />
287273 Sending...
288274 </ >
289275 ) : (
@@ -334,7 +320,10 @@ const QuickstartPage = () => {
334320 </ div >
335321 { hasCredits && (
336322 < div className = "flex items-center gap-1 rounded-full bg-green-100 px-2 py-1 dark:bg-green-900" >
337- < Zap size = { 12 } className = "text-green-600 dark:text-green-400" />
323+ < Zap
324+ size = { 12 }
325+ className = "text-green-600 dark:text-green-400"
326+ />
338327 < span className = "text-xs font-medium text-green-700 dark:text-green-300" >
339328 ${ ( creditData ?. balance ?? 0 ) . toFixed ( 2 ) }
340329 </ span >
@@ -351,9 +340,7 @@ const QuickstartPage = () => {
351340 </ div >
352341
353342 { /* BYOK Option */ }
354- < div
355- className = "flex items-start justify-between gap-3 rounded-lg border-2 border-muted-foreground/20 bg-muted p-4"
356- >
343+ < div className = "flex items-start justify-between gap-3 rounded-lg border-2 border-muted-foreground/20 bg-muted p-4" >
357344 < div className = "flex flex-1 items-center gap-3" >
358345 < div className = "flex h-10 w-10 items-center justify-center rounded-lg bg-background" >
359346 < Key size = { 20 } className = "text-muted-foreground" />
@@ -368,7 +355,10 @@ const QuickstartPage = () => {
368355 </ div >
369356 { hasProviderKeys && (
370357 < div className = "flex items-center gap-1 rounded-full bg-green-100 px-2 py-1 dark:bg-green-900" >
371- < Zap size = { 12 } className = "text-green-600 dark:text-green-400" />
358+ < Zap
359+ size = { 12 }
360+ className = "text-green-600 dark:text-green-400"
361+ />
372362 < span className = "text-xs font-medium text-green-700 dark:text-green-300" >
373363 Configured
374364 </ span >
@@ -430,7 +420,10 @@ const QuickstartPage = () => {
430420 < div className = "rounded-sm border border-green-200 bg-green-50 p-3 dark:border-green-900 dark:bg-green-950" >
431421 < div className = "flex flex-col gap-2" >
432422 < div className = "flex items-start gap-2" >
433- < Check size = { 16 } className = "mt-0.5 text-green-600 dark:text-green-400" />
423+ < Check
424+ size = { 16 }
425+ className = "mt-0.5 text-green-600 dark:text-green-400"
426+ />
434427 < div className = "flex-1" >
435428 < p className = "text-sm font-medium text-green-900 dark:text-green-100" >
436429 Response:
@@ -457,7 +450,9 @@ const QuickstartPage = () => {
457450 { testError && (
458451 < div className = "rounded-sm border border-red-200 bg-red-50 p-3 dark:border-red-900 dark:bg-red-950" >
459452 < div className = "flex items-start gap-2" >
460- < div className = "mt-0.5 text-sm text-red-600 dark:text-red-400" > ✗</ div >
453+ < div className = "mt-0.5 text-sm text-red-600 dark:text-red-400" >
454+ ✗
455+ </ div >
461456 < div className = "flex-1" >
462457 < p className = "text-sm font-medium text-red-900 dark:text-red-100" >
463458 Error:
@@ -584,7 +579,10 @@ const QuickstartPage = () => {
584579 < div className = "flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10" >
585580 < BarChart size = { 20 } className = "text-primary" />
586581 </ div >
587- < ArrowRight size = { 16 } className = "text-muted-foreground transition-transform group-hover:translate-x-1" />
582+ < ArrowRight
583+ size = { 16 }
584+ className = "text-muted-foreground transition-transform group-hover:translate-x-1"
585+ />
588586 </ div >
589587 < div >
590588 < h4 className = "font-semibold" > View Dashboard</ h4 >
@@ -604,7 +602,10 @@ const QuickstartPage = () => {
604602 < div className = "flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10" >
605603 < ListTreeIcon size = { 20 } className = "text-primary" />
606604 </ div >
607- < ArrowRight size = { 16 } className = "text-muted-foreground transition-transform group-hover:translate-x-1" />
605+ < ArrowRight
606+ size = { 16 }
607+ className = "text-muted-foreground transition-transform group-hover:translate-x-1"
608+ />
608609 </ div >
609610 < div >
610611 < h4 className = "font-semibold" > Setup Sessions</ h4 >
@@ -624,7 +625,10 @@ const QuickstartPage = () => {
624625 < div className = "flex h-10 w-10 items-center justify-center rounded-lg bg-primary/10" >
625626 < UserPlus size = { 20 } className = "text-primary" />
626627 </ div >
627- < ArrowRight size = { 16 } className = "text-muted-foreground transition-transform group-hover:translate-x-1" />
628+ < ArrowRight
629+ size = { 16 }
630+ className = "text-muted-foreground transition-transform group-hover:translate-x-1"
631+ />
628632 </ div >
629633 < div >
630634 < h4 className = "font-semibold" > Invite Members</ h4 >
@@ -637,7 +641,6 @@ const QuickstartPage = () => {
637641 </ Link >
638642 </ div >
639643 </ div >
640-
641644 </ div >
642645
643646 < Sheet open = { isProviderSheetOpen } onOpenChange = { setIsProviderSheetOpen } >
0 commit comments