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:
@@ -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}`,
|
||||
|
||||
Reference in New Issue
Block a user