I´m building a website but when clicking the submit I cant seem to understand the error the error is
Erro ao enviar o pedido. Detalhes:
Error
Cannot POST /orders
however the route seems correct , I can send the rest of my code this is pretty much the last thing on the school project that I missing as requirements rather than fixing other issues
import React, { useState, useEffect, useRef } from “react”;
import axios from “axios”;
import { BrowserRouter as Router, Routes, Route } from “react-router-dom”;
import Header from “./components/Header”;
import ProductList from “./components/ProductList”;
import Footer from “./components/Footer”;
import CartPage from “./pages/CartPage”;
import Cart from “./components/Cart”;
import LoginPage from “./pages/LoginPage”;
import AboutUs from “./pages/AboutUs”;
import Contact from “./pages/Contact”;
// Video element reference
const videoRef = useRef(null);
// Play the video automatically when the component mounts
useEffect(() => {
if (videoRef.current) {
videoRef.current.play().catch((error) => {
console.error(“Erro ao tentar reproduzir o vídeo:”, error);
});
}
}, );
<video
ref={videoRef}
controls
autoPlay
loop
muted
className=“homepage-video”
style={{ width: “100%”, height: “auto” }}
>
Seu navegador não suporta a tag de vídeo.