fix(tradein/v2): гонка при клике по строке «Предыдущие оценки» — отчёт не загружался #2428

Merged
lekss361 merged 4 commits from fix/tradein-cacheview-restore-race into main 2026-07-04 14:47:02 +00:00
Showing only changes of commit 62e2a7ba85 - Show all commits

View file

@ -424,8 +424,7 @@ export default function TradeInV2Page() {
string | null | undefined
>(undefined);
const urlId =
pendingRestoreId !== undefined ? pendingRestoreId : readUrlId();
const urlId = pendingRestoreId !== undefined ? pendingRestoreId : readUrlId();
// Post-mount flag: readUrlId() is null on SSR but a UUID on the client's first
// render, so any structure that depends on the id (e.g. the PDF <a> vs disabled