From 9078b5631a57cc4ab95b42ce5d1a932dfaa22cab Mon Sep 17 00:00:00 2001 From: DanielS Date: Tue, 11 Aug 2026 22:08:47 +0200 Subject: [PATCH] feat(wizard): add directional slide animations --- shop/components/order-wizard.tsx | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/shop/components/order-wizard.tsx b/shop/components/order-wizard.tsx index 3d2104c..b63db5f 100644 --- a/shop/components/order-wizard.tsx +++ b/shop/components/order-wizard.tsx @@ -94,6 +94,7 @@ export function OrderWizard({ const router = useRouter() // Upgrade-Mode: starte direkt bei Schritt 3 (Software) const [step, setStep] = useState(upgradeMode ? 3 : (initialOrder ? 3 : 1)) + const [direction, setDirection] = useState(1) const [isSubmitting, setIsSubmitting] = useState(false) const [selectedCompanyId, setSelectedCompanyId] = useState( initialOrder?.company_id ?? (isAdmin ? 'all' : null) @@ -543,10 +544,12 @@ export function OrderWizard({ addToBasket() } } + setDirection(1) setStep(s => s + 1) } const prevStep = () => { + setDirection(-1) setStep(s => s - 1) } @@ -848,7 +851,7 @@ export function OrderWizard({ {/* Dynamic Header */} {step !== 3 && (
-

+

Konfigurieren Sie Ihre Lösung

@@ -869,9 +872,9 @@ export function OrderWizard({ {step === 1 && (

@@ -931,7 +934,7 @@ export function OrderWizard({ {/* LEFT: Categories Sidebar Menu */}
-

+

Konfigurieren Sie Ihre Lösung

@@ -1108,9 +1111,9 @@ export function OrderWizard({ {step === 4 && (