изменение хэдера и исправление ключеых багов

This commit is contained in:
egortriston
2025-07-08 17:27:26 +03:00
parent 8055886082
commit 96e11b0220
10 changed files with 117 additions and 52 deletions

View File

@ -355,15 +355,17 @@ const VehicleDetailsPage = () => {
{ shallow: true }
);
};
// Функция для закрытия VinQuick и удаления quickgroup из URL
// --- Сброс VinQuick (selectedQuickGroup) и quickgroup в URL ---
const closeQuickGroup = () => {
setSelectedQuickGroup(null);
const { quickgroup, ...rest } = router.query;
router.push(
{ pathname: router.pathname, query: rest },
undefined,
{ shallow: true }
);
if (quickgroup) {
router.push(
{ pathname: router.pathname, query: rest },
undefined,
{ shallow: true }
);
}
};
// --- Синхронизация selectedNode (KnotIn) с URL ---
@ -448,6 +450,7 @@ const VehicleDetailsPage = () => {
activeTab={activeTab}
openedPath={openedPath}
setOpenedPath={setOpenedPath}
onCloseQuickGroup={closeQuickGroup}
/>
{searchState.isSearching ? (
<div className="knot-parts">