(playlist)
| 458 | }; |
| 459 | |
| 460 | const toggleActive = async (playlist) => { |
| 461 | try { |
| 462 | // Send only the is_active field to trigger our special handling |
| 463 | await API.updatePlaylist( |
| 464 | { |
| 465 | id: playlist.id, |
| 466 | is_active: !playlist.is_active, |
| 467 | }, |
| 468 | true |
| 469 | ); // Add a new parameter to indicate this is just a toggle |
| 470 | } catch (error) { |
| 471 | console.error('Error toggling active state:', error); |
| 472 | } |
| 473 | }; |
| 474 | |
| 475 | const columns = useMemo( |
| 476 | () => [ |
no test coverage detected