6.6.2: Фикс навигации при создании задачи из желания
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m6s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m6s
This commit is contained in:
@@ -174,13 +174,12 @@ function WishlistDetail({ wishlistId, onNavigate, onRefresh, boardId, onClose, p
|
||||
|
||||
const handleCreateTask = () => {
|
||||
if (!wishlistItem || !wishlistItem.unlocked || wishlistItem.completed) return
|
||||
// Сначала навигация, потом закрытие диалога желания
|
||||
onNavigate?.('task-form', { wishlistId: wishlistId })
|
||||
// Убираем запись из истории без вызова popstate
|
||||
if (historyPushedForWishlistRef.current) {
|
||||
historyPushedForWishlistRef.current = false
|
||||
}
|
||||
// Сбрасываем refs чтобы popstate handler и cleanup не мешали навигации
|
||||
// history.back() не вызываем — App.jsx заменит запись модала через replaceState
|
||||
historyPushedForWishlistRef.current = false
|
||||
wishlistIdRef.current = null
|
||||
onClose?.()
|
||||
onNavigate?.('task-form', { wishlistId: wishlistId })
|
||||
}
|
||||
|
||||
const handleTaskCheckmarkClick = (e) => {
|
||||
|
||||
Reference in New Issue
Block a user