fixed layout to all app pages. updated product page to use api/products

This commit is contained in:
2024-11-22 10:28:45 -05:00
parent 7bd701dc04
commit fb034831fa
5 changed files with 44 additions and 8 deletions

View File

@@ -8,7 +8,7 @@ export default function Products() {
useEffect(() => {
async function fetchProducts() {
try {
const response = await fetch("https://api.example.com/products");
const response = await fetch("/api/products");
const data = await response.json();
setProducts(data);
setLoading(false);