feat: implement dynamic API base URL and add language toggle in MainForm
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user