fix: replace hardcoded localhost:3001 URLs with relative paths
All checks were successful
Deploy / deploy (push) Successful in 13s

Fixes CORS errors when deployed behind a reverse proxy by removing
hardcoded localhost references in Brands.jsx and PostCard.jsx.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
fahed
2026-03-01 11:19:54 +03:00
parent 0c945405e3
commit 12415d5426
2 changed files with 2 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ export default function PostCard({ post, onClick, onMove, compact = false }) {
>
{post.thumbnail_url && (
<div className="w-[calc(100%+1.5rem)] h-32 -mx-3 -mt-3 mb-2 rounded-t-lg overflow-hidden">
<img src={`http://localhost:3001${post.thumbnail_url}`} alt="" className="w-full h-full object-cover" />
<img src={post.thumbnail_url} alt="" className="w-full h-full object-cover" />
</div>
)}

View File

@@ -7,7 +7,7 @@ import { AppContext } from '../App'
import Modal from '../components/Modal'
import { SkeletonCard } from '../components/SkeletonLoader'
const API_BASE = import.meta.env.VITE_API_URL || 'http://localhost:3001/api'
const API_BASE = '/api'
const EMPTY_BRAND = { name: '', name_ar: '', priority: 2, icon: '' }