Changed an import based on new types
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ import { useEffect, useState } from 'react'
|
||||
import { useRouter } from 'next/navigation'
|
||||
import { X } from 'lucide-react'
|
||||
import { useTheme } from 'next-themes'
|
||||
import { useOnboarding } from '@/components/onboarding/useOnboarding'
|
||||
import { useOnboarding } from '@/components/onboarding/store'
|
||||
import { ConnectStep } from '@/components/onboarding/connect-step/connect-step'
|
||||
import { ConfigureStep } from '@/components/onboarding/configure-step/configure-step'
|
||||
import { DeployStep } from '@/components/onboarding/deploy-step/deploy-step'
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
import { PlusCircle, Loader2, AlertTriangle, Info } from 'lucide-react'
|
||||
import { useTheme } from 'next-themes'
|
||||
import { useOnboarding } from '@/components/onboarding/useOnboarding'
|
||||
import { useOnboarding } from '@/components/onboarding/store'
|
||||
import { useGQLClient } from '@/context'
|
||||
import { useWallet } from '@/context/WalletContext'
|
||||
import { Button } from '@workspace/ui/components/button'
|
||||
|
||||
@@ -5,7 +5,7 @@ import { useState, useEffect } from 'react'
|
||||
import { Github, Wallet, CheckCircle2, AlertTriangle, Loader2, ExternalLink, ChevronDown } from 'lucide-react'
|
||||
import { useTheme } from 'next-themes'
|
||||
import { SignIn } from '@clerk/nextjs'
|
||||
import { useOnboarding } from '@/components/onboarding/useOnboarding'
|
||||
import { useOnboarding } from '@/components/onboarding/store'
|
||||
import { useAuthStatus } from '@/hooks/useAuthStatus'
|
||||
import { useRepoData } from '@/hooks/useRepoData'
|
||||
import { Button } from '@workspace/ui/components/button'
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import { useState, useEffect } from 'react'
|
||||
import { useTheme } from 'next-themes'
|
||||
import { Github, Loader2, AlertTriangle, CheckCircle2 } from 'lucide-react'
|
||||
import { useOnboarding } from '@/components/onboarding/useOnboarding'
|
||||
import { useOnboarding } from '@/components/onboarding/store'
|
||||
import { useWallet } from '@/context/WalletContext'
|
||||
import { useDeployment } from '@/hooks/useDeployment'
|
||||
import { useTemplateDeployment } from '@/hooks/useTemplate'
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
// Template type for onboarding
|
||||
export interface Template {
|
||||
id: string
|
||||
name: string
|
||||
description: string // Required string
|
||||
repoFullName: string // Required string
|
||||
framework?: string
|
||||
icon?: string // Optional string
|
||||
}
|
||||
|
||||
// Deployer type (compatible with GraphQL client)
|
||||
export interface Deployer {
|
||||
deployerLrn: string
|
||||
deploymentLrn: string
|
||||
name: string
|
||||
baseDomain: string
|
||||
minimumPayment?: string | null
|
||||
}
|
||||
|
||||
// Organization type
|
||||
export interface Organization {
|
||||
id: string
|
||||
slug: string
|
||||
name: string
|
||||
}
|
||||
|
||||
// Environment variable type for onboarding
|
||||
export interface OnboardingEnvVar {
|
||||
key: string
|
||||
value: string
|
||||
environments: string[]
|
||||
}
|
||||
|
||||
// Complete onboarding form data interface
|
||||
export interface OnboardingFormData {
|
||||
// Step 1: Connect (Repository or Template selection)
|
||||
githubRepo?: string
|
||||
template?: Template
|
||||
projectName?: string
|
||||
deploymentMode?: 'repository' | 'template'
|
||||
|
||||
// Step 2: Configure
|
||||
selectedLrn?: string
|
||||
selectedOrg?: string // Add the missing selectedOrg property
|
||||
environmentVariables?: OnboardingEnvVar[] // Use proper array type
|
||||
deploymentType?: 'auction' | 'lrn' // Add missing properties
|
||||
deployerCount?: string
|
||||
maxPrice?: string
|
||||
paymentAddress?: string // Add missing paymentAddress property
|
||||
|
||||
// Step 3: Deploy
|
||||
deploymentId?: string
|
||||
repositoryUrl?: string // Add missing repositoryUrl property
|
||||
deploymentUrl?: string // Add missing deploymentUrl property
|
||||
projectId?: string // Add missing projectId property
|
||||
}
|
||||
|
||||
// Deployment configuration types
|
||||
export interface TemplateDeploymentConfig {
|
||||
template: Template
|
||||
projectName: string
|
||||
organizationSlug: string
|
||||
environmentVariables?: OnboardingEnvVar[]
|
||||
deployerLrn: string
|
||||
}
|
||||
|
||||
export interface DeploymentConfig {
|
||||
projectId: string
|
||||
organizationSlug: string
|
||||
repository: string
|
||||
branch: string
|
||||
name: string
|
||||
environmentVariables?: OnboardingEnvVar[]
|
||||
}
|
||||
|
||||
// Repository type for GitHub integration
|
||||
export interface Repository {
|
||||
id: string
|
||||
name: string
|
||||
full_name: string
|
||||
default_branch: string
|
||||
html_url: string
|
||||
description?: string | null
|
||||
owner: {
|
||||
login: string
|
||||
avatar_url: string
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user