// App.js
import React, { useState } from “react”;
import ‘./App.css’;
function App() {
const [step, setStep] = useState(1);
const [progress, setProgress] = useState(12.5);
const [formData, setFormData] = useState({
deviceType: “”,
brand: “”,
category: “”,
model: “”,
service: “”,
deliveryMethod: “”,
store: “”,
firstName: “”,
lastName: “”,
email: “”,
phone: “”,
serialIMEI: “”,
notes: “”,
appointmentTime: “”,
});
const handleNext = () => {
if (step < 8) {
setStep(step + 1);
setProgress(progress + 12.5);
}
};
const handleBack = () => {
if (step > 1) {
setStep(step – 1);
setProgress(progress – 12.5);
}
};
const handleChange = (e) => {
setFormData({
…formData,
[e.target.name]: e.target.value,
});
};
const handleSubmit = (e) => {
e.preventDefault();
alert(“Booking submitted successfully!”);
console.log(formData);
};
return (
);
}
export default App;