fix: get backend url from env
All checks were successful
/ Build (push) Successful in 34s

This commit is contained in:
log101 2024-07-29 21:39:07 +03:00
parent d9cc6c2d30
commit 9674be37cf

View File

@ -44,10 +44,13 @@ const handleSubmit = async (e: SubmitEvent) => {
const formData = new FormData(e.target as HTMLFormElement)
const res = await fetch(`http://127.0.0.1:3000/api/location`, {
const res = await fetch(
`${import.meta.env.PUBLIC_BACKEND_URL}/api/location`,
{
method: "POST",
body: formData,
})
}
)
if (res.status === 200) {
const data = await res.json()