add lucide-react dependency and update form handling in MainForm

- Added lucide-react to package dependencies
- Refactored MainForm to improve form handling and user selection
- Removed SuccessPage component and related logic
- Updated localization files to include new keys for invoice details
- Created interfaces for form data and messages
This commit is contained in:
2026-05-10 19:39:32 +02:00
parent 746530ae4c
commit 5c035ba1c0
8 changed files with 413 additions and 581 deletions
+8 -17
View File
@@ -1,23 +1,14 @@
import { API_BASE } from "../config/api.config";
import type { FormData } from "../config/interfaces.config";
interface FormData {
firstName: string;
lastName: string;
email: string;
phoneNumber: string;
tickets: number;
companyName: string;
cmpFirstName: string;
cpmLastName: string;
cpmEmail: string;
cpmPhoneNumber: string;
street: string;
postalCode: string;
paymentMethod: string;
}
export const submitFormData = async (
data: FormData,
username: string | null,
) => {
if (username == null) {
return { success: false, errorCode: "x001" };
}
export const submitFormData = async (data: FormData, username: string) => {
console.log(data);
try {
const response = await fetch(
`${API_BASE}/default/new-entry?username=${username}`,