Skip to content

Commit ceeab8d

Browse files
committed
fix: remove duplicate navigation buttons in tour wizard
1 parent 6af9bb5 commit ceeab8d

1 file changed

Lines changed: 4 additions & 40 deletions

File tree

components/tour-wizard.tsx

Lines changed: 4 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"use client"
22

33
import { useState } from "react"
4-
import { Button } from "@/components/ui/button"
4+
55
import { GlassCard } from "./glass-card"
66
import { SectionHeader } from "./section-header"
77
import { TourWizardControlProps } from "./tour-wizard-control-props"
8-
import { ChevronLeft, ChevronRight, Check, MapPin, Calendar, User, Settings, CheckCircle } from "lucide-react"
8+
import { Check, MapPin, Calendar, User, Settings, CheckCircle } from "lucide-react"
99

1010
interface TourWizardData {
1111
propertyType: string[]
@@ -42,19 +42,6 @@ const initialData: TourWizardData = {
4242
export function TourWizard() {
4343
const [currentStep, setCurrentStep] = useState(1)
4444
const [formData, setFormData] = useState<TourWizardData>(initialData)
45-
const totalSteps = 5
46-
47-
const nextStep = () => {
48-
if (currentStep < totalSteps) {
49-
setCurrentStep(currentStep + 1)
50-
}
51-
}
52-
53-
const prevStep = () => {
54-
if (currentStep > 1) {
55-
setCurrentStep(currentStep - 1)
56-
}
57-
}
5845

5946
const handleSubmit = () => {
6047
console.log("[v0] Tour booking submitted:", formData)
@@ -126,32 +113,9 @@ export function TourWizard() {
126113
formData={formData}
127114
onDataChange={handleWizardChange}
128115
onStepChange={setCurrentStep}
116+
onSubmit={handleSubmit}
117+
onCancel={() => setCurrentStep(1)}
129118
/>
130-
131-
{/* Navigation Buttons */}
132-
<div className="flex justify-between mt-8 pt-6 border-t border-white/10">
133-
<Button
134-
variant="outline"
135-
onClick={prevStep}
136-
disabled={currentStep === 1}
137-
className="glass border-gold text-gold hover:bg-gold hover:text-gold-foreground bg-transparent"
138-
>
139-
<ChevronLeft className="w-4 h-4 mr-2" />
140-
Previous
141-
</Button>
142-
143-
{currentStep < totalSteps ? (
144-
<Button onClick={nextStep} className="bg-gold text-gold-foreground hover:bg-gold/90">
145-
Next
146-
<ChevronRight className="w-4 h-4 ml-2" />
147-
</Button>
148-
) : (
149-
<Button onClick={handleSubmit} className="bg-gold text-gold-foreground hover:bg-gold/90">
150-
<Check className="w-4 h-4 mr-2" />
151-
Submit Tour Request
152-
</Button>
153-
)}
154-
</div>
155119
</div>
156120
</div>
157121
)

0 commit comments

Comments
 (0)