fix(tradein): PDF-ссылка через API_BASE_URL (basePath)

href Скачать PDF был /api/v1/... без префикса /trade-in → попадал в
main gendesign backend (404). Та же причина что #373 для apiFetch.
This commit is contained in:
lekss361 2026-05-21 10:15:44 +03:00
parent 259f5ece4d
commit aeb895a9dc

View file

@ -5,6 +5,7 @@
* Сравнение trade-in vs самостоятельная продажа + 4 преимущества + CTA.
*/
import type { AggregatedEstimate } from "@/types/trade-in";
import { API_BASE_URL } from "@/lib/api";
interface Props {
estimate: AggregatedEstimate;
@ -174,7 +175,7 @@ export function OfferCard({ estimate }: Props) {
</div>
<div className="offer-cta-buttons">
<a
href={`/api/v1/trade-in/estimate/${estimate.estimate_id}/pdf`}
href={`${API_BASE_URL}/api/v1/trade-in/estimate/${estimate.estimate_id}/pdf`}
download={`trade-in-${estimate.estimate_id}.pdf`}
className="btn btn-ghost"
>