fix(tradein): PDF-ссылка через API_BASE_URL (basePath)
href Скачать PDF был /api/v1/... без префикса /trade-in → попадал в main gendesign backend (404). Та же причина что #373 для apiFetch.
This commit is contained in:
parent
259f5ece4d
commit
aeb895a9dc
1 changed files with 2 additions and 1 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
* Сравнение trade-in vs самостоятельная продажа + 4 преимущества + CTA.
|
* Сравнение trade-in vs самостоятельная продажа + 4 преимущества + CTA.
|
||||||
*/
|
*/
|
||||||
import type { AggregatedEstimate } from "@/types/trade-in";
|
import type { AggregatedEstimate } from "@/types/trade-in";
|
||||||
|
import { API_BASE_URL } from "@/lib/api";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
estimate: AggregatedEstimate;
|
estimate: AggregatedEstimate;
|
||||||
|
|
@ -174,7 +175,7 @@ export function OfferCard({ estimate }: Props) {
|
||||||
</div>
|
</div>
|
||||||
<div className="offer-cta-buttons">
|
<div className="offer-cta-buttons">
|
||||||
<a
|
<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`}
|
download={`trade-in-${estimate.estimate_id}.pdf`}
|
||||||
className="btn btn-ghost"
|
className="btn btn-ghost"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue