fix(souq): add missing /mobile basePath prefix to listing API fetch

fetch('/api/marketplace/listings?...') was hitting the wrong URL
(404) because the app is deployed under /mobile basePath. Changed
to fetch('/mobile/api/marketplace/listings?...') which matches the
correct API route.
This commit is contained in:
root
2026-06-19 00:01:03 +02:00
parent 44f304fb6b
commit 1cf5426f13
+1 -1
View File
@@ -97,7 +97,7 @@ export default function SouqPage() {
if (activeCategory !== "All") params.set("category", activeCategory); if (activeCategory !== "All") params.set("category", activeCategory);
if (searchQuery.trim()) params.set("search", searchQuery.trim()); if (searchQuery.trim()) params.set("search", searchQuery.trim());
const res = await fetch(`/api/marketplace/listings?${params.toString()}`); const res = await fetch(`/mobile/api/marketplace/listings?${params.toString()}`);
const data = await res.json(); const data = await res.json();
if (res.ok) { if (res.ok) {
setListings(data.listings); setListings(data.listings);