feat: implement dynamic API base URL and add language toggle in MainForm

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-05-04 22:03:21 +02:00
parent ab9cfd6cbf
commit 4df6d243f3
4 changed files with 46 additions and 9 deletions
+3 -1
View File
@@ -1,3 +1,5 @@
import { API_BASE } from "../config/api.config";
interface FormData {
firstName: string;
lastName: string;
@@ -18,7 +20,7 @@ export const submitFormData = async (data: FormData, username: string) => {
console.log(data);
try {
const response = await fetch(
`http://localhost:8004/default/new-entry?username=${username}`,
`${API_BASE}/default/new-entry?username=${username}`,
{
method: "POST",
headers: {