Исправление создания желаний на досках
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m27s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 1m27s
This commit is contained in:
@@ -399,7 +399,10 @@ function Wishlist({ onNavigate, refreshTrigger = 0, isActive = false, initialBoa
|
||||
}
|
||||
|
||||
const handleAddClick = () => {
|
||||
onNavigate?.('wishlist-form', { wishlistId: undefined, boardId: selectedBoardId })
|
||||
// Если selectedBoardId равен null, но есть доски, используем первую доску
|
||||
// Если доски еще не загружены, используем initialBoardId
|
||||
const boardIdToUse = selectedBoardId || (boards.length > 0 ? boards[0].id : initialBoardId)
|
||||
onNavigate?.('wishlist-form', { wishlistId: undefined, boardId: boardIdToUse })
|
||||
}
|
||||
|
||||
const handleItemClick = (item) => {
|
||||
|
||||
Reference in New Issue
Block a user