fix: Move preset selector from company-profile to SDK dashboard

Presets now shown on the SDK start page (/sdk) as a card grid
between header and stats — only when companyName is empty.
Click navigates to /sdk/company-profile?preset={id}.

Reverted company-profile/page.tsx to original state (no preset
logic there — the dashboard is the right place for discovery).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-05-03 08:03:13 +02:00
parent e853a47879
commit 8f4a23a32d
2 changed files with 26 additions and 32 deletions
@@ -1,6 +1,6 @@
'use client'
import React, { useState } from 'react'
import React from 'react'
import { useCompanyProfileForm } from './_hooks/useCompanyProfileForm'
import { STEP_EXPLANATIONS } from './_components/constants'
import { StepBasicInfo } from './_components/StepBasicInfo'
@@ -11,8 +11,6 @@ import { StepDataProtection } from './_components/StepDataProtection'
import { StepLegalFramework } from './_components/StepLegalFramework'
import { StepMachineBuilder } from './_components/StepMachineBuilder'
import { ProfileSummary } from './_components/ProfileSummary'
import { PresetSelector } from './_components/PresetSelector'
import { COMPANY_PROFILE_PRESETS } from '@/lib/sdk/company-profile-presets'
export default function CompanyProfilePage() {
const {
@@ -23,35 +21,6 @@ export default function CompanyProfilePage() {
isDeleting, goToNextStep,
} = useCompanyProfileForm()
const [showPresets, setShowPresets] = useState(!formData.companyName)
// Preset selection view (before wizard)
if (showPresets && currentStep !== 99) {
return (
<div className="min-h-screen bg-gray-50 py-8">
<div className="max-w-6xl mx-auto px-4">
<PresetSelector
onSelect={(preset) => {
updateFormData({
legalForm: preset.profile.legalForm as never,
industry: preset.profile.industry,
businessModel: preset.profile.businessModel as never,
companySize: preset.profile.companySize as never,
employeeCount: preset.profile.employeeCount,
headquartersCountry: preset.profile.headquartersCountry,
targetMarkets: preset.profile.targetMarkets as never[],
isDataController: preset.profile.isDataController,
isDataProcessor: preset.profile.isDataProcessor,
})
setShowPresets(false)
}}
onSkip={() => setShowPresets(false)}
/>
</div>
</div>
)
}
// Summary view (step 99)
if (currentStep === 99) {
return (