From d12c0797a4b4727429089c114978c9af7533e663 Mon Sep 17 00:00:00 2001 From: "nabijonovdavronbek619@gmail.com" Date: Wed, 4 Feb 2026 10:26:37 +0500 Subject: [PATCH] car category request fixed --- app/[lang]/[carType]/page.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/[lang]/[carType]/page.tsx b/app/[lang]/[carType]/page.tsx index f158c63..e711652 100644 --- a/app/[lang]/[carType]/page.tsx +++ b/app/[lang]/[carType]/page.tsx @@ -8,7 +8,7 @@ import { useCarType } from "@/store/carType"; import { usePathname } from "next/navigation"; import { useEffect, useState } from "react"; -const baseUrl = "https://api.spes-texnika.uz/api/v1/subcategory/"; +const baseUrl = "https://api.spes-texnika.uz/api/v1/subcategory/?category="; export default function CartType() { const initialCar = useCarType((state) => state.initialCar); @@ -19,7 +19,7 @@ export default function CartType() { const [cars, setCars] = useState([]); console.log("car type id: ", initialCar.id); - console.log("request URL: ", `${baseUrl}${initialCar.id}/`); + console.log("request URL: ", `${baseUrl}${initialCar.id}`); useEffect(() => { // Agar ID bo'lmasa, fetchni ishga tushirma @@ -33,7 +33,7 @@ export default function CartType() { setLoading(true); setError(null); - const response = await fetch(`${baseUrl}${initialCar.id}/`, { + const response = await fetch(`${baseUrl}${initialCar.id}`, { headers: { "Accept-Language": lang, },