6.6.2: Фикс навигации при создании задачи из желания
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m6s

This commit is contained in:
poignatov
2026-03-10 15:59:05 +03:00
parent a441a3d1e7
commit 23f16a8bef
3 changed files with 7 additions and 8 deletions

View File

@@ -1 +1 @@
6.6.1 6.6.2

View File

@@ -1,6 +1,6 @@
{ {
"name": "play-life-web", "name": "play-life-web",
"version": "6.6.1", "version": "6.6.2",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",

View File

@@ -174,13 +174,12 @@ function WishlistDetail({ wishlistId, onNavigate, onRefresh, boardId, onClose, p
const handleCreateTask = () => { const handleCreateTask = () => {
if (!wishlistItem || !wishlistItem.unlocked || wishlistItem.completed) return if (!wishlistItem || !wishlistItem.unlocked || wishlistItem.completed) return
// Сначала навигация, потом закрытие диалога желания // Сбрасываем refs чтобы popstate handler и cleanup не мешали навигации
onNavigate?.('task-form', { wishlistId: wishlistId }) // history.back() не вызываем — App.jsx заменит запись модала через replaceState
// Убираем запись из истории без вызова popstate historyPushedForWishlistRef.current = false
if (historyPushedForWishlistRef.current) { wishlistIdRef.current = null
historyPushedForWishlistRef.current = false
}
onClose?.() onClose?.()
onNavigate?.('task-form', { wishlistId: wishlistId })
} }
const handleTaskCheckmarkClick = (e) => { const handleTaskCheckmarkClick = (e) => {